Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

CTString Class Reference

String class Implemented in: tvu_string.cpp. More...

#include <tvu_typesdef.h>

Inheritance diagram for CTString::

CTObject

Public Methods

 CTString ()
 Constructors/Destructors. More...

 CTString (char cFill, TINT nLength)
 CTString (TLPCSTR lpStr)
CTString& Attach (TLPCSTR lpStr)
virtual ~CTString ()
 DEFINE_ID_FUNCTIONS (CTString, CTObject, CLASSNAME_TYPE_STRING_ID, CLASSNAME_TYPE_STRING) public
virtual TINT GetIntValue ()
virtual double GetDoubleValue ()
virtual TLPCSTR GetStringValue ()
virtual TBOOL OnSaving (LPCTFile pFile, TINT Marge)
 Save the object. More...

virtual TBOOL OnSaving (TLPSTR pBuffers, TINT Marge)
virtual TBOOL IsNeedtoSave ()
 Verify if the object need to be saved. More...

virtual TBOOL SaveExpression (LPCTFile pFile, TINT Marge)
 Save as a mathematical expression. More...

virtual TBOOL OnLoading (LPTBYTE *lpBuffers)
 Load the object from buffers. More...

virtual TBOOL OnLoading (LPCTFile pFile)
 Load the object a file. More...

TLPSTR STR ()
 Operations Get the string buffer. More...

TINT Length ()
 Get length of the contained string. More...

char operator[] (TINT nIndex)
 Get the character at a position. More...

virtual CTObjectCalculate (TINT iOperator, CTObject *Object)
 Comparing operations Calculate the mathematical operators: +, -, *, / and the comparing operators: =, <, <=, >, >=. In this case, the returned value is an object of CTInt. More...

TBOOL operator== (TLPCSTR lpStr)
TBOOL operator== (CTString &String)
 A string of character. More...

TBOOL operator!= (TLPCSTR lpStr)
 A string of character. More...

TBOOL operator!= (CTString &String)
 A string of character. More...

CTString& operator= (TLPCSTR lpStr)
 Copying operator. More...

CTString& operator= (CTString &String)
 An object. More...

CTString& operator+ (TLPCSTR lpStr)
 Concatenate. More...

CTString& operator+ (CTString &String)
 An object. More...

CTString& operator+= (TLPCSTR lpStr)
CTString& operator+= (CTString &String)
 An object. More...

TINT Find (TLPCSTR pStr)
 Processing Find the string pStr in this string Return: position of the first occurrence -1: none. More...


Static Public Methods

CTString& FromStr (TLPCSTR lpStr)
 Convert. More...

TLPSTR LoadString (LPTBYTE *lpBuffers, TLPSTR lpDes=TNULL)
 Load a string from buffers lpDes == TNULL => create a new string buffer return: lpDes. More...

TBOOL IsABC (char c)
 The functions for type conversion. More...

TBOOL IsNaming (char c)
TBOOL IsSeekable (char c)
 May be used to be in a name. More...

TBOOL IsStartComment (char c)
 May be passed. More...

TBOOL IsSeparator1 (char c)
 {, #. More...

TBOOL IsSeparator2 (char c)
TBOOL IsSeparator (char c)
TBOOL IsNumber (char c)
TBOOL PassComment (TLPCSTR *lpStr)
TLPSTR GetString1 (TLPSTR Buffers, TLPCSTR *lpStr)
TLPSTR GetString (TLPSTR Buffers, TLPCSTR *lpStr)
TLPSTR GetStringInt (TLPSTR Buffers, TLPCSTR *lpStr)
TINT GetInt (const char *lpStr, int *iPos)
TINT GetInt (TLPCSTR *lpStr)
double GetDouble (TLPCSTR *lpStr)
TINTGetCourrentLineNumber ()
TLPSTR Read (TLPSTR str, THFILE f=TNULL)
TLPSTR PureString (TLPSTR src, TLPSTR des=TNULL, char BS='')
TLPSTR GetFirstWord (TLPCSTR str, TLPCSTR separator="", TLPSTR FirstWord=TNULL)
TINT IsStringContainCharacter (TLPCSTR str, char c, TBOOL bSeekOverString=TTRUE)
 Verify if a string contains a character. Returned value: the position of the first occur, or -1 ifnot. More...

TVOID CreateCompareTable ()

Static Public Attributes

TBOOL m_CompareExactly
 For compare. More...

char m_CompareTable [256]

Protected Methods

TLPSTR Alloc (TINT nLength)
 Methodes Allocate the mem. for string. More...

void Delete ()
 Free the mem. More...

void ReplaceBuffer (TLPSTR lpNewStr)
 Replace the buffer. More...


Protected Attributes

TLPSTR m_Buffer
 Data. More...

TBOOL m_Attach
 Contains the string. More...


Static Protected Attributes

TINT m_nLine

Detailed Description

String class Implemented in: tvu_string.cpp.


Constructor & Destructor Documentation

CTString::CTString ( )
 

Constructors/Destructors.


Member Function Documentation

TLPSTR CTString::Alloc ( TINT nLength ) [protected]
 

Methodes Allocate the mem. for string.

CTObject * CTString::Calculate ( TINT iOperator,
CTObject * Object ) [virtual]
 

Comparing operations Calculate the mathematical operators: +, -, *, / and the comparing operators: =, <, <=, >, >=. In this case, the returned value is an object of CTInt.

Reimplemented from CTObject.

void CTString::Delete ( ) [protected]
 

Free the mem.

TINT CTString::Find ( TLPCSTR pStr )
 

Processing Find the string pStr in this string Return: position of the first occurrence -1: none.

CTString & CTString::FromStr ( TLPCSTR lpStr ) [static]
 

Convert.

TBOOL CTString::IsABC ( char c ) [static]
 

The functions for type conversion.

TBOOL CTString::IsNeedtoSave ( ) [inline, virtual]
 

Verify if the object need to be saved.

Reimplemented from CTObject.

01197 { return m_Buffer && (m_Buffer[0] != 0); };

TBOOL CTString::IsSeekable ( char c ) [static]
 

May be used to be in a name.

TBOOL CTString::IsSeparator1 ( char c ) [static]
 

{, #.

TBOOL CTString::IsStartComment ( char c ) [static]
 

May be passed.

TINT CTString::IsStringContainCharacter ( TLPCSTR str,
char c,
TBOOL bSeekOverString = TTRUE ) [static]
 

Verify if a string contains a character. Returned value: the position of the first occur, or -1 ifnot.

TINT CTString::Length ( ) [inline]
 

Get length of the contained string.

01209 { if (!m_Buffer) return 0; return (TINT)strlen((const char*)m_Buffer); };

TLPSTR CTString::LoadString ( LPTBYTE * lpBuffers,
TLPSTR lpDes = TNULL ) [static]
 

Load a string from buffers lpDes == TNULL => create a new string buffer return: lpDes.

TBOOL CTString::OnLoading ( LPCTFile pFile ) [virtual]
 

Load the object a file.

Reimplemented from CTObject.

TBOOL CTString::OnLoading ( LPTBYTE * lpBuffers ) [virtual]
 

Load the object from buffers.

Reimplemented from CTObject.

TBOOL CTString::OnSaving ( LPCTFile pFile,
TINT Marge ) [virtual]
 

Save the object.

Reimplemented from CTObject.

void CTString::ReplaceBuffer ( TLPSTR lpNewStr ) [protected]
 

Replace the buffer.

TLPSTR CTString::STR ( ) [inline]
 

Operations Get the string buffer.

01207 { return m_Buffer; };

TBOOL CTString::SaveExpression ( LPCTFile pFile,
TINT Marge ) [inline, virtual]
 

Save as a mathematical expression.

Reimplemented from CTObject.

01199 { return OnSaving(pFile, Marge); };

TBOOL CTString::operator!= ( CTString & String ) [inline]
 

A string of character.

01224                         { return *this != String.STR(); };

TBOOL CTString::operator!= ( TLPCSTR lpStr ) [inline]
 

A string of character.

01222                         { return !(*this == lpStr); };

CTString & CTString::operator+ ( CTString & String ) [inline]
 

An object.

01232                         { return *this + (TLPCSTR)String.STR(); };

CTString & CTString::operator+ ( TLPCSTR lpStr )
 

Concatenate.

CTString & CTString::operator+= ( CTString & String ) [inline]
 

An object.

01236                         { return *this += (TLPCSTR)String.STR(); };

CTString & CTString::operator= ( CTString & String ) [inline]
 

An object.

01228                         { *((LPCTObject)this) = String; return *this = (TLPCSTR)String.STR(); };

CTString & CTString::operator= ( TLPCSTR lpStr )
 

Copying operator.

TBOOL CTString::operator== ( CTString & String ) [inline]
 

A string of character.

01220                         { return *this == String.STR(); };

char CTString::operator[] ( TINT nIndex ) [inline]
 

Get the character at a position.

01211 { return (m_Buffer) ? m_Buffer[nIndex] : 0; };


Field Documentation

TBOOL CTString::m_Attach [protected]
 

Contains the string.

TLPSTR CTString::m_Buffer [protected]
 

Data.

TBOOL CTString::m_CompareExactly [static]
 

For compare.


The documentation for this class was generated from the following file:
Generated at Wed Aug 6 15:59:01 2003 for TVU's libraries for video surveillance: by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001