Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

String Class Reference
[Base]

Standard string with some extensions. More...

#include <gmlstring.h>

Inheritance diagram for String:

PathString List of all members.

Public Member Functions

Standard constructors (the same as in std::string)
 String ()
 Empty string.

 String (const string &rhs)
 Copy constructor.

 String (const string &rhs, size_type pos, size_type n)
 Constructor from substring.

 String (const char *s, size_type n)
 From N characters of C string.

 String (const char *s)
 From C string.

 String (size_type n, char c)
 A sequence of n chars.

 String (const_iterator first, const_iterator last)
 two iterators point to a some string of list of chars

MFC, VCL - specific functions (use defines to enable them)
CString AsCString () const
 Conversion to MFC string.

Utility functions
int AsInt () const
 To integer.

double AsDouble () const
 To double.

void Format (const char *format,...)
 write a formatted string and a variable list of arguments to this object

void FormatV (const char *format, va_list arglist)
 write a formatted string and a variable list of arguments to this object


Detailed Description

Standard string with some extensions.

Note:
use it instead of std::string
Warning:
If you wish to make classes derived from String (or std::string) please be careful NOT no provide own destructor. This is so because the base class std::string has no virtual destructor and in case of addressing via pointer to the base class destructor of derived class will not be called!


Constructor & Destructor Documentation

String const string &  rhs,
size_type  pos,
size_type  n
[inline]
 

Constructor from substring.

Parameters:
rhs is a source string
pos is a start position
n is number of characters


Member Function Documentation

CString AsCString  )  const [inline]
 

Conversion to MFC string.

Note:
works only if GML_USE_MFC is defined

int AsInt  )  const [inline]
 

To integer.

Returns:
return 0 if the input cannot be converted to a value of that type

double AsDouble  )  const [inline]
 

To double.

Returns:
return 0.0 if the input cannot be converted to a value of that type


The documentation for this class was generated from the following files:
Generated on Tue Jan 13 21:12:03 2004 for Graphics and Media Lab CSL by doxygen 1.3.4