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

String Class Reference

#include <String.h>

List of all members.

Public Member Functions

 String ()
 String (unsigned int cap)
 String (const char *string)
 String (const char *string, unsigned int len)
 String (const String &string)
 ~String ()
void setLength (const unsigned int newLength)
unsigned int getLength () const
bool isEmpty () const
void assign (const char *string, const unsigned int len)
void append (const char *string, const unsigned int len)
bool insert (const unsigned int pos, const char *string, const unsigned int len)
bool remove (const unsigned int pos, const unsigned int len)
 operator const char * () const
void operator= (const char *string)
void operator= (const String &string)
void operator+= (const char *string)
void operator+= (const String &string)

Private Attributes

charstr
unsigned int length
unsigned int capasity


Detailed Description

String.h

Author: Petter Alstermark, petter@alstermark.com

Definition at line 15 of file String.h.


Constructor & Destructor Documentation

String::String  ) 
 

Definition at line 16 of file String.cpp.

References capasity, length, and str.

String::String unsigned int  cap  ) 
 

Definition at line 22 of file String.cpp.

References capasity, length, and str.

String::String const char string  ) 
 

Definition at line 28 of file String.cpp.

References capasity, length, and str.

String::String const char string,
unsigned int  len
 

Definition at line 34 of file String.cpp.

References capasity, length, and str.

String::String const String string  ) 
 

Definition at line 41 of file String.cpp.

References capasity, length, and str.

String::~String  ) 
 

Definition at line 49 of file String.cpp.

References str.


Member Function Documentation

void String::append const char string,
const unsigned int  len
 

Definition at line 71 of file String.cpp.

References capasity, getAppropriateCapasity(), length, and str.

Referenced by operator+=().

Here is the call graph for this function:

void String::assign const char string,
const unsigned int  len
 

Definition at line 59 of file String.cpp.

References capasity, getAppropriateCapasity(), length, and str.

Referenced by operator=().

Here is the call graph for this function:

unsigned int String::getLength  )  const [inline]
 

Definition at line 25 of file String.h.

References length.

Referenced by Menu::handleChar(), and Console::handleKey().

bool String::insert const unsigned int  pos,
const char string,
const unsigned int  len
 

Definition at line 83 of file String.cpp.

References capasity, getAppropriateCapasity(), length, and str.

Referenced by Menu::handleChar(), and Console::handleChar().

Here is the call graph for this function:

bool String::isEmpty  )  const [inline]
 

Definition at line 26 of file String.h.

References length.

String::operator const char *  )  const [inline]
 

Definition at line 33 of file String.h.

References str.

void String::operator+= const String string  ) 
 

Definition at line 125 of file String.cpp.

References append(), length, and str.

Here is the call graph for this function:

void String::operator+= const char string  ) 
 

Definition at line 121 of file String.cpp.

References append().

Here is the call graph for this function:

void String::operator= const String string  ) 
 

Definition at line 117 of file String.cpp.

References assign(), length, and str.

Here is the call graph for this function:

void String::operator= const char string  ) 
 

Definition at line 113 of file String.cpp.

References assign().

Here is the call graph for this function:

bool String::remove const unsigned int  pos,
const unsigned int  len
 

Definition at line 102 of file String.cpp.

References length, and str.

Referenced by Menu::handleChar(), and Console::handleKey().

void String::setLength const unsigned int  newLength  ) 
 

Definition at line 54 of file String.cpp.

References capasity, length, and str.


Member Data Documentation

unsigned int String::capasity [private]
 

Definition at line 43 of file String.h.

Referenced by append(), assign(), insert(), setLength(), and String().

unsigned int String::length [private]
 

Definition at line 42 of file String.h.

Referenced by append(), assign(), getLength(), insert(), isEmpty(), operator+=(), operator=(), remove(), setLength(), and String().

char* String::str [private]
 

Definition at line 41 of file String.h.

Referenced by append(), assign(), insert(), operator const char *(), operator+=(), operator=(), remove(), setLength(), String(), and ~String().


Generated on Sun Jun 5 15:51:06 2005 for Defacto by  doxygen 1.4.3