K3dString Class Reference

#include <K3dString.h>

Inheritance diagram for K3dString:

K3dMatrix K3dStream K3dVector4 K3dMngSystem K3dScene List of all members.

Public Member Functions

 K3dString ()
 K3dString (const char *_str)
 K3dString (const K3dString &_rStr)
 K3dString (const TString &_rStr)
 ~K3dString ()
size_t Find (const char *_str)
 Find string.
size_t RFind (const char *_str)
 Reverse find string.
TStringSetNum (int _iVal)
 Convert int to string.
TStringSetNum (bool _bVal)
 Convert bool to string.
TStringSetNum (unsigned int _uiVal)
 Convert unsigned to string.
TStringSetNum (float _fVal)
 Convert float to string.
K3dStringGetStrTok (K3dString &_strOut, const K3dString &_strSign)
 Finding sign _strSign and cuts to the two strings (front and back strings of sign _strSign).
K3dStringLeft (size_t _iPos)
 Returns a substring that contains the _iPos leftmost characters of the string.
K3dStringRight (size_t _iPos)
 Returns a substring that contains the _iPos rightmost characters of the string.
TStringToLower ()
 Convert string to lower case.
void StrLwr (const char *_str)
 Convert apper case string to the lower case string.
void AddNumber (const int _iVal)
 Add number behind string.
bool & GetFoundToken ()
void GetString (const char *_strOut)
 Get "const char*" string.
int ToInt ()
 Convert string to int.
float ToFloat ()
 Convert string to float.
double ToDouble ()
 Convert string to double.
TStringGetString ()
 Get std::string.
const TStringGetString () const
 Get std::string.
void SetString (const char *_str)
 Set "const char*" string.
K3dStringoperator= (K3dString &_rStr)
K3dStringoperator= (const K3dString &_rStr)
K3dStringoperator= (const char *_str)
K3dStringoperator+= (const K3dString &_rStr)
K3dStringoperator+= (const char *_str)
char & operator[] (int _iPos)
bool operator!= (const char *_str)
bool operator!= (const char *_str) const
bool operator!= (const K3dString &_str)
bool operator== (const char *_str)
bool operator== (const char *_str) const
bool operator== (K3dString &_str)
bool operator== (K3dString &_str) const
void Erase (size_t _uiPos, size_t _uiNumPos)
size_t GetSize ()
 Get string size.
size_t GetLength ()
 Get string length.
size_t Find (const K3dString &_str)
 Searche for the first occurrence of the substring _str.
void AddString (char *_strOut, const unsigned int _iStrLen, const char *_strIn, const int _i)
 Add string from int.
void AddString (char *_strOut, const unsigned int _iStrLen, const char *_strIn, const int _iVal0, const int _iVal1)
 Add string from two ints.
void AddString (char *_strOut, const unsigned int _iStrLen, const char *_strIn, const char *_strAdd)
 Add string.
void AddString (char *_strOut, const unsigned int _iStrLen, const char *_strIn, const float _f)
 Add string from float.
void AddStringNumber (char *_strOut, const unsigned int _iStrLen, const char *_strIn, const int _i)
 Add number behind string.
void Clear ()
 Clear current string.

Private Attributes

TString m_str
bool m_bFoundToken
 Found token in GetStrTok() function ?

Detailed Description

Work with strigs

Author:
Jan Koci
Since:
0.2.0.0

Definition at line 69 of file K3dString.h.


Constructor & Destructor Documentation

K3dString::K3dString (  )  [inline]

Definition at line 74 of file K3dString.h.

K3dString::K3dString ( const char *  _str  )  [inline]

Definition at line 75 of file K3dString.h.

References m_str.

K3dString::K3dString ( const K3dString _rStr  )  [inline]

Definition at line 87 of file K3dString.h.

K3dString::K3dString ( const TString _rStr  )  [inline]

Definition at line 91 of file K3dString.h.

References m_str.

K3dString::~K3dString (  )  [inline]

Definition at line 95 of file K3dString.h.


Member Function Documentation

size_t K3dString::Find ( const char *  _str  ) 

Find string.

Parameters:
_str Input string
Return values:
size_t Position in string. If not found, return the value string::npos

Definition at line 65 of file K3dString.cpp.

References m_str.

Referenced by GetStrTok().

size_t K3dString::RFind ( const char *  _str  ) 

Reverse find string.

Parameters:
_str Input string
Return values:
size_t Position in string. If not found, return the value string::npos

Definition at line 73 of file K3dString.cpp.

References m_str.

TString & K3dString::SetNum ( int  _iVal  ) 

Convert int to string.

Parameters:
_iVal Integer value
Return values:
m_str std::string value

Definition at line 81 of file K3dString.cpp.

References m_str.

Referenced by AddNumber(), K3dKeyMap::FindKeyMapAction(), and K3dSceneData::InitPath().

TString & K3dString::SetNum ( bool  _bVal  ) 

Convert bool to string.

Parameters:
_bVal Bool value
Return values:
m_str std::string value

Definition at line 91 of file K3dString.cpp.

References m_str.

TString & K3dString::SetNum ( unsigned int  _uiVal  ) 

Convert unsigned to string.

Parameters:
_uiVal Unsigned int value
Return values:
m_str std::string value

Definition at line 106 of file K3dString.cpp.

References m_str.

TString & K3dString::SetNum ( float  _fVal  ) 

Convert float to string.

Parameters:
_fVal Float value
Return values:
m_str std::string value

Definition at line 116 of file K3dString.cpp.

References m_str.

K3dString & K3dString::GetStrTok ( K3dString _strOut,
const K3dString _strSign 
)

Finding sign _strSign and cuts to the two strings (front and back strings of sign _strSign).

Parameters:
_strOut Output right string back of sign _strSign
_strSign String sign
Return values:
QString Left string front of sign _strSign

Definition at line 171 of file K3dString.cpp.

References Find(), GetString(), Left(), m_bFoundToken, m_str, and Right().

Referenced by K3dMenu::ShowFileListBox().

K3dString & K3dString::Left ( size_t  _iPos  ) 

Returns a substring that contains the _iPos leftmost characters of the string.

Parameters:
_iPos Leftmost characters of the string

Definition at line 135 of file K3dString.cpp.

References m_str.

Referenced by GetStrTok().

K3dString & K3dString::Right ( size_t  _iPos  ) 

Returns a substring that contains the _iPos rightmost characters of the string.

Parameters:
_iPos Rrightmost characters of the string

Definition at line 152 of file K3dString.cpp.

References m_str.

Referenced by GetStrTok().

TString & K3dString::ToLower (  ) 

Convert string to lower case.

Return values:
m_str std::string value

Definition at line 43 of file K3dString.cpp.

References m_str.

Referenced by StrLwr().

void K3dString::StrLwr ( const char *  _str  ) 

Convert apper case string to the lower case string.

Parameters:
_str Input string

Definition at line 51 of file K3dString.cpp.

References m_str, and ToLower().

void K3dString::AddNumber ( const int  _iVal  ) 

Add number behind string.

Parameters:
_iVal Integer value

Definition at line 126 of file K3dString.cpp.

References m_str, and SetNum().

Referenced by K3dBlockBuild::LoadBlocks(), K3dFontBmp::LoadBmpFonts(), K3dCameraBuild::LoadCameras(), K3dFaceBuild::LoadFaces(), K2dImageBuild::LoadImages(), K3dLineBuild::LoadLines(), K3dPlaneBuild::LoadPlanes(), K3dRayBuild::LoadRays(), K3dSphereBuild::LoadSpheres(), K3dTextureBuild::LoadTextures(), and K3dVertexBuild::LoadVertices().

bool& K3dString::GetFoundToken (  )  [inline]

Definition at line 110 of file K3dString.h.

References m_bFoundToken.

void K3dString::GetString ( const char *  _strOut  )  [inline]

Get "const char*" string.

Parameters:
_strOut IO String

Definition at line 117 of file K3dString.h.

References m_str.

Referenced by K3dKeyMapBuild::CheckLoadError(), K3dPolyWork::CheckPoly(), Find(), K3dKeyMap::FindKeyMapAction(), K3dSceneData::GetPath(), GetStrTok(), K3dMngSystem::InitMngSystem(), K3dScene::Load(), K3dBlockBuild::LoadBlocks(), K3dFontBmp::LoadBmpFonts(), K3dCameraBuild::LoadCameras(), K3dConfDataBuild::LoadConf(), K3dFaceBuild::LoadFaces(), K3dOptions::LoadFontBmp(), K3dOptions::LoadGraphics(), K3dGui::LoadGui(), K3dGui::LoadGuiButtons(), K3dGui::LoadGuiCheckBoxes(), K3dGui::LoadGuiContainers(), K3dGui::LoadGuiDropDown(), K3dGui::LoadGuiFonts(), K3dGui::LoadGuiIcons(), K3dGui::LoadGuiImages(), K3dGui::LoadGuiLabels(), K3dGui::LoadGuiListBoxes(), K3dGui::LoadGuiListModels(), K3dGui::LoadGuiRadioButtons(), K3dGui::LoadGuiScrollAreas(), K3dGui::LoadGuiSliders(), K3dGui::LoadGuiTextBoxes(), K3dGui::LoadGuiTextFields(), K3dGui::LoadGuiWindows(), K2dImageBuild::LoadImages(), K3dStream::LoadIni(), K3dKeyMapBuild::LoadKeyMap(), K3dLineBuild::LoadLines(), K3dVM::LoadMap(), K3dMenu::LoadMapFromListBox(), K3dScene::LoadNewScript(), K3dOptions::LoadOptions(), K3dPlaneBuild::LoadPlanes(), K3dRayBuild::LoadRays(), K3dOptions::LoadScript(), K3dVM::LoadScript(), K3dSphereBuild::LoadSpheres(), K3dOptions::LoadTexture(), K3dTextureBuild::LoadTextures(), K3dVertexBuild::LoadVertices(), K3dLua::LuaGetFieldBool(), K3dLua::LuaGetFieldNumber(), K3dLua::LuaGetFieldString(), operator!=(), operator+(), operator+=(), operator=(), operator==(), K3dScene::SetScenePaths(), and K3dMenu::ShowFileListBox().

int K3dString::ToInt (  )  [inline]

Convert string to int.

Definition at line 123 of file K3dString.h.

References m_str.

float K3dString::ToFloat (  )  [inline]

Convert string to float.

Definition at line 132 of file K3dString.h.

References m_str.

double K3dString::ToDouble (  )  [inline]

Convert string to double.

Definition at line 141 of file K3dString.h.

References m_str.

TString& K3dString::GetString (  )  [inline]

Get std::string.

Return values:
m_str Reference to std::string

Definition at line 151 of file K3dString.h.

References m_str.

const TString& K3dString::GetString (  )  const [inline]

Get std::string.

Return values:
m_str Reference to std::string

Definition at line 158 of file K3dString.h.

References m_str.

void K3dString::SetString ( const char *  _str  )  [inline]

Set "const char*" string.

Definition at line 164 of file K3dString.h.

References m_str.

K3dString& K3dString::operator= ( K3dString _rStr  )  [inline]

Definition at line 169 of file K3dString.h.

References GetString(), and m_str.

K3dString& K3dString::operator= ( const K3dString _rStr  )  [inline]

Definition at line 175 of file K3dString.h.

References GetString(), and m_str.

K3dString& K3dString::operator= ( const char *  _str  )  [inline]

Definition at line 181 of file K3dString.h.

References m_str.

K3dString& K3dString::operator+= ( const K3dString _rStr  )  [inline]

Definition at line 187 of file K3dString.h.

References GetString(), and m_str.

K3dString& K3dString::operator+= ( const char *  _str  )  [inline]

Definition at line 193 of file K3dString.h.

References m_str.

char& K3dString::operator[] ( int  _iPos  )  [inline]

Reimplemented in K3dMatrix, and K3dVector4.

Definition at line 199 of file K3dString.h.

References m_str.

bool K3dString::operator!= ( const char *  _str  )  [inline]

Definition at line 204 of file K3dString.h.

References m_str.

bool K3dString::operator!= ( const char *  _str  )  const [inline]

Definition at line 217 of file K3dString.h.

References m_str.

bool K3dString::operator!= ( const K3dString _str  )  [inline]

Definition at line 230 of file K3dString.h.

References GetString(), and m_str.

bool K3dString::operator== ( const char *  _str  )  [inline]

Definition at line 243 of file K3dString.h.

References m_str.

bool K3dString::operator== ( const char *  _str  )  const [inline]

Definition at line 256 of file K3dString.h.

References m_str.

bool K3dString::operator== ( K3dString _str  )  [inline]

Definition at line 269 of file K3dString.h.

References GetString(), and m_str.

bool K3dString::operator== ( K3dString _str  )  const [inline]

Definition at line 282 of file K3dString.h.

References GetString(), and m_str.

void K3dString::Erase ( size_t  _uiPos,
size_t  _uiNumPos 
) [inline]

Definition at line 295 of file K3dString.h.

References m_str.

size_t K3dString::GetSize (  )  [inline]

Get string size.

Definition at line 301 of file K3dString.h.

References m_str.

size_t K3dString::GetLength (  )  [inline]

Get string length.

Definition at line 307 of file K3dString.h.

References m_str.

size_t K3dString::Find ( const K3dString _str  )  [inline]

Searche for the first occurrence of the substring _str.

Parameters:
_str Input string
Return values:
size_t Position in string. If not found, return the value string::npos

Definition at line 315 of file K3dString.h.

References GetString(), and m_str.

void K3dString::AddString ( char *  _strOut,
const unsigned int  _iStrLen,
const char *  _strIn,
const int  _i 
) [inline]

Add string from int.

Definition at line 321 of file K3dString.h.

void K3dString::AddString ( char *  _strOut,
const unsigned int  _iStrLen,
const char *  _strIn,
const int  _iVal0,
const int  _iVal1 
) [inline]

Add string from two ints.

Definition at line 327 of file K3dString.h.

void K3dString::AddString ( char *  _strOut,
const unsigned int  _iStrLen,
const char *  _strIn,
const char *  _strAdd 
) [inline]

Add string.

Definition at line 333 of file K3dString.h.

void K3dString::AddString ( char *  _strOut,
const unsigned int  _iStrLen,
const char *  _strIn,
const float  _f 
) [inline]

Add string from float.

Definition at line 339 of file K3dString.h.

void K3dString::AddStringNumber ( char *  _strOut,
const unsigned int  _iStrLen,
const char *  _strIn,
const int  _i 
) [inline]

Add number behind string.

Definition at line 345 of file K3dString.h.

void K3dString::Clear (  )  [inline]

Clear current string.

Definition at line 351 of file K3dString.h.

References m_str.


Member Data Documentation

TString K3dString::m_str [private]

Definition at line 71 of file K3dString.h.

Referenced by AddNumber(), Clear(), Erase(), Find(), GetLength(), GetSize(), GetString(), GetStrTok(), K3dString(), Left(), operator!=(), operator+=(), operator=(), operator==(), operator[](), RFind(), Right(), SetNum(), SetString(), StrLwr(), ToDouble(), ToFloat(), ToInt(), and ToLower().

bool K3dString::m_bFoundToken [private]

Found token in GetStrTok() function ?

Definition at line 72 of file K3dString.h.

Referenced by GetFoundToken(), and GetStrTok().


The documentation for this class was generated from the following files:
Generated on Thu Aug 16 23:53:34 2007 for K3dEngine by  doxygen 1.5.0