Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

StString Class Reference

#include <StString.h>

List of all members.

Public Member Functions

 StString ()
StStringoperator<< (const char *txt)
StStringoperator<< (int I)
StStringoperator<< (unsigned int I)
StStringoperator<< (short I)
StStringoperator<< (unsigned short I)
StStringoperator<< (long I)
StStringoperator<< (unsigned long I)
StStringoperator<< (long long I)
StStringoperator<< (unsigned long long I)
StStringoperator<< (float F)
StStringoperator<< (double D)
void precision (int prec)
const std::string & str ()

Private Attributes

int fPrec


Constructor & Destructor Documentation

StString::StString  )  [inline]
 

Definition at line 7 of file StString.h.

00007 {fPrec=0;}


Member Function Documentation

StString & StString::operator<< double  D  ) 
 

Definition at line 50 of file StString.cc.

00051 { 00052 char cbuf[200]; 00053 if (!fPrec) { 00054 sprintf(cbuf,"%g",I); 00055 } else { 00056 sprintf(cbuf,"%.*g",fPrec,I); 00057 } 00058 fPrec = 0; 00059 (*this) += cbuf; 00060 return *this; 00061 }

StString & StString::operator<< float  F  ) 
 

Definition at line 64 of file StString.cc.

00065 { double d = I; *this << d; return *this;}

StString & StString::operator<< unsigned long long  I  ) 
 

Definition at line 28 of file StString.cc.

00029 { 00030 char cbuf[100]; 00031 if (!fPrec) { 00032 sprintf(cbuf,"%lu",(unsigned long)I); 00033 } else { 00034 sprintf(cbuf,"%.*lu",fPrec,(unsigned long)I); 00035 } 00036 fPrec = 0; 00037 (*this) += cbuf; 00038 return (*this); 00039 }

StString & StString::operator<< long long  I  ) 
 

Definition at line 6 of file StString.cc.

00007 { 00008 char cbuf[200]; 00009 if (!fPrec) { 00010 sprintf(cbuf,"%ld",(long)I); 00011 } else { 00012 sprintf(cbuf,"%.*ld",fPrec,(long)I); 00013 } 00014 fPrec = 0; 00015 (*this) += cbuf; 00016 return *this; 00017 }

StString & StString::operator<< unsigned long  I  ) 
 

Definition at line 41 of file StString.cc.

00042 { unsigned long long l = I; *this << l;return *this;}

StString & StString::operator<< long  I  ) 
 

Definition at line 19 of file StString.cc.

00020 { long long l = I; *this << l;return *this;}

StString & StString::operator<< unsigned short  I  ) 
 

Definition at line 47 of file StString.cc.

00048 { unsigned long long l = I; *this << l;return *this;}

StString & StString::operator<< short  I  ) 
 

Definition at line 25 of file StString.cc.

00026 { long long l = I; *this << l;return *this;}

StString & StString::operator<< unsigned int  I  ) 
 

Definition at line 44 of file StString.cc.

00045 { unsigned long long l = I; *this << l;return *this;}

StString & StString::operator<< int  I  ) 
 

Definition at line 22 of file StString.cc.

00023 { long long l = I; *this << l;return *this;}

StString& StString::operator<< const char *  txt  )  [inline]
 

Definition at line 9 of file StString.h.

00009 { (*this)+=txt; return *this;}

void StString::precision int  prec  )  [inline]
 

Definition at line 20 of file StString.h.

00020 {fPrec = prec;}

const std::string& StString::str  )  [inline]
 

Definition at line 22 of file StString.h.

00022 {return *((const std::string*)this);}


Member Data Documentation

int StString::fPrec [private]
 

Definition at line 25 of file StString.h.


The documentation for this class was generated from the following files:
Generated on Thu Aug 24 14:46:12 2006 for Doxygen by doxygen 1.3.7