LRAUV  revA
CodedStr Class Reference

Extends the Str class, adding an unsigned short code (actually, the codes are limited to 14 bits, for a range of 0 to 16383) More...

#include <CodedStr.h>

Inheritance diagram for CodedStr:
Collaboration diagram for CodedStr:

Public Member Functions

 CodedStr (const Str &strIn, unsigned short code=NO_CODE)
 Extends the Str class, adding an unsigned short code (actually, the codes are limited to 14 bits, for a range of 0 to 16383) More...
 
virtual ~CodedStr ()
 
unsigned short getCode () const
 
void setCode (const unsigned short code)
 
unsigned int write (OutStream &outStream) const
 
- Public Member Functions inherited from Str
 Str (const char *str=NULL, size_t length=NO_POS)
 char* constructor Unit tests in Str_Test.testConstructorCharStar More...
 
 Str (const Str &str, const size_t offset=0, size_t count=NO_POS)
 copy constructor Unit tests in Str_Test.testCopyConstructor More...
 
 Str (const bool var)
 bool constructor Unit tests in Str_Test.testBoolConstructor More...
 
 Str (const double var, unsigned int precision=6)
 double constructor Unit tests in Str_Test.testDoubleConstructor More...
 
 Str (const int var, unsigned int radix=10, unsigned int radixOffset=0)
 int constructor Unit tests in Str_Test.testIntConstructor More...
 
 Str (const size_t var, unsigned int radix=16)
 size_t constructor Unit tests in Str_Test.testUnsignedIntConstructor More...
 
virtual ~Str ()
 destructor More...
 
Strset (const char *str=NULL, size_t length=NO_POS)
 
Stroperator= (const char *str)
 
Stroperator= (const Str &str)
 
Stroperator= (const double var)
 
Str substr (const size_t offset, size_t count=NO_POS) const
 
char operator[] (const size_t index) const
 
Stroperator+= (const bool str)
 
Stroperator+= (const unsigned char str)
 
Stroperator+= (const double str)
 
Stroperator+= (const int str)
 
Stroperator+= (const size_t str)
 
Stroperator+= (const char *str)
 
Stroperator+= (const Str &str)
 
Strappend (const Str &str)
 
Strappend (const char *str, size_t length)
 
StrpushBack (const unsigned char str)
 
Stroperator<< (const bool str)
 
Stroperator<< (const unsigned char str)
 
Stroperator<< (const double str)
 
Stroperator<< (const int str)
 
Stroperator<< (const size_t str)
 
Stroperator<< (const char *str)
 
Stroperator<< (const Str &str)
 
bool operator!= (const Str &str) const
 
bool operator!= (const char *str) const
 
int compare (const Str &str) const
 
int compare (const char *str) const
 
bool operator== (const Str &str) const
 
bool operator== (const char *str) const
 
bool operator< (const Str &str) const
 
const char * cStr () const
 
const char * data () const
 
size_t length () const
 
size_t size () const
 
size_t findLastOf (const unsigned char str) const
 returns the position of the specified character in the string, looking from the end of the string towards the beginning. More...
 
size_t findLastOf (const char *str) const
 returns the position of the specified character string in the string, looking from the end of the string towards the beginning. More...
 
size_t find (const unsigned char str, size_t offset=0) const
 
size_t find (const char *str, size_t offset=0) const
 
size_t find (const Str &str, size_t offset=0) const
 
bool startsWith (const char *str, size_t length=NO_POS) const
 
bool startsWith (const Str &str) const
 
bool endsWith (const Str &str) const
 
bool setChar (size_t index, const unsigned char theChar)
 
void replaceChar (const char replace, const char replaceWith)
 
Strsplit (int &num, const char *splitSpec, size_t length=NO_POS) const
 
Strsplit (int &num, const Str str) const
 
Str asHex () const
 Return a new Str, with a hex representation of each character of this string. More...
 

Static Public Member Functions

static CodedStrRead (InStream &inStream)
 
- Static Public Member Functions inherited from Str
static size_t FindLastOf (const char *str, const unsigned char theChar, size_t length=NO_POS)
 
static size_t Find (const char *str, const unsigned char theChar, size_t length=NO_POS)
 
static unsigned int IntToAscii (int value, char *str, unsigned int base, unsigned int bufSize, unsigned int baseOffset=0)
 convert an integer to a string, returns the length of the string Unit tests in Str_Test.testIntToAscii More...
 

Static Public Attributes

static const unsigned short NO_CODE = 0x3FFF
 
- Static Public Attributes inherited from Str
static const size_t NO_POS
 static constants More...
 
static const size_t MAX_LEN
 
static const Str EMPTY_STR
 
static char NoChars_ [1] = ""
 

Private Attributes

unsigned short code_
 

Additional Inherited Members

- Protected Member Functions inherited from Str
virtual void intoString (const double var, unsigned int precision=10)
 
virtual void intoString (int var, unsigned int radix, unsigned int radixOffset=0)
 
- Protected Attributes inherited from Str
size_t length_
 
char * chars_
 

Detailed Description

Extends the Str class, adding an unsigned short code (actually, the codes are limited to 14 bits, for a range of 0 to 16383)

Constructor & Destructor Documentation

virtual CodedStr::~CodedStr ( )
inlinevirtual

Member Function Documentation

void CodedStr::setCode ( const unsigned short  code)
inline
unsigned int CodedStr::write ( OutStream outStream) const

Member Data Documentation

unsigned short CodedStr::code_
private

Referenced by getCode(), setCode(), and write().


The documentation for this class was generated from the following files: