Blender V2.61 - r43446
|
#include <STR_String.h>
Public Member Functions | |
STR_String () | |
STR_String (char c) | |
STR_String (char c, int len) | |
STR_String (const char *str) | |
STR_String (const char *str, int len) | |
STR_String (const STR_String &str) | |
STR_String (const STR_String &str, int len) | |
STR_String (const char *src1, int src1_len, const char *src2, int src2_len) | |
STR_String (int val) | |
STR_String (dword val) | |
STR_String (float val) | |
STR_String (double val) | |
~STR_String () | |
STR_String & | Format (const char *fmt,...) |
STR_String & | FormatAdd (const char *fmt,...) |
void | Clear () |
const STR_String & | Reverse () |
bool | IsUpper () const |
bool | IsLower () const |
bool | IsEmpty () const |
int | Length () const |
STR_String & | SetLength (int len) |
char | GetAt (int pos) const |
void | SetAt (int pos, char c) |
void | SetAt (int pos, rcSTR_String str) |
void | SetAt (int pos, int num, rcSTR_String str) |
void | Replace (int pos, rcSTR_String str) |
void | Replace (int pos, int num, rcSTR_String str) |
STR_String | Left (int num) const |
STR_String | Right (int num) const |
STR_String | Mid (int pos, int num=INT_MAX) const |
int | Compare (rcSTR_String rhs) const |
int | CompareNoCase (rcSTR_String rhs) const |
bool | IsEqual (rcSTR_String rhs) const |
bool | IsEqualNoCase (rcSTR_String rhs) const |
int | Find (char c, int pos=0) const |
int | Find (const char *str, int pos=0) const |
int | Find (rcSTR_String str, int pos=0) const |
int | RFind (char c) const |
int | FindOneOf (const char *set, int pos=0) const |
int | RFindOneOf (const char *set, int pos=0) const |
vector< STR_String > | Explode (char c) const |
STR_String & | Upper () |
STR_String & | Lower () |
STR_String & | Capitalize () |
STR_String & | TrimLeft () |
STR_String & | TrimLeft (char *set) |
STR_String & | TrimRight () |
STR_String & | TrimRight (char *set) |
STR_String & | Trim () |
STR_String & | Trim (char *set) |
STR_String & | TrimQuotes () |
operator const char * () const | |
char * | Ptr () |
const char * | ReadPtr () const |
float | ToFloat () const |
int | ToInt () const |
rcSTR_String | operator= (const byte *rhs) |
rcSTR_String | operator= (rcSTR_String rhs) |
rcSTR_String | operator= (char rhs) |
rcSTR_String | operator= (const char *rhs) |
rcSTR_String | operator+= (const char *rhs) |
rcSTR_String | operator+= (rcSTR_String rhs) |
rcSTR_String | operator+= (char rhs) |
Protected Member Functions | |
void | AllocBuffer (int len, bool keep_contents) |
rcSTR_String | Copy (const char *src, int len) |
rcSTR_String | Concat (const char *data, int len) |
Static Protected Member Functions | |
static bool | isLower (char c) |
static bool | isUpper (char c) |
static bool | isSpace (char c) |
Protected Attributes | |
char * | pData |
int | Len |
int | Max |
Friends | |
bool | operator< (rcSTR_String lhs, rcSTR_String rhs) |
bool | operator< (rcSTR_String lhs, const char *rhs) |
bool | operator< (const char *lhs, rcSTR_String rhs) |
bool | operator> (rcSTR_String lhs, rcSTR_String rhs) |
bool | operator> (rcSTR_String lhs, const char *rhs) |
bool | operator> (const char *lhs, rcSTR_String rhs) |
bool | operator<= (rcSTR_String lhs, rcSTR_String rhs) |
bool | operator<= (rcSTR_String lhs, const char *rhs) |
bool | operator<= (const char *lhs, rcSTR_String rhs) |
bool | operator>= (rcSTR_String lhs, rcSTR_String rhs) |
bool | operator>= (rcSTR_String lhs, const char *rhs) |
bool | operator>= (const char *lhs, rcSTR_String rhs) |
bool | operator== (rcSTR_String lhs, rcSTR_String rhs) |
bool | operator== (rcSTR_String lhs, const char *rhs) |
bool | operator== (const char *lhs, rcSTR_String rhs) |
bool | operator!= (rcSTR_String lhs, rcSTR_String rhs) |
bool | operator!= (rcSTR_String lhs, const char *rhs) |
bool | operator!= (const char *lhs, rcSTR_String rhs) |
Smart String Value class. Is used by parser when an expression tree is build containing string.
Definition at line 74 of file STR_String.h.
STR_String::STR_String | ( | ) |
Copyright (C) 2001 NaN Technologies B.V. This file was formerly known as: GEN_StdString.cpp.
Definition at line 59 of file STR_String.cpp.
References pData.
STR_String::STR_String | ( | char | c | ) |
Definition at line 72 of file STR_String.cpp.
References pData.
STR_String::STR_String | ( | char | c, |
int | len | ||
) |
STR_String::STR_String | ( | const char * | str | ) |
STR_String::STR_String | ( | const char * | str, |
int | len | ||
) |
STR_String::STR_String | ( | const STR_String & | str | ) |
STR_String::STR_String | ( | const STR_String & | str, |
int | len | ||
) |
STR_String::STR_String | ( | const char * | src1, |
int | src1_len, | ||
const char * | src2, | ||
int | src2_len | ||
) |
Definition at line 171 of file STR_String.cpp.
STR_String::STR_String | ( | int | val | ) | [explicit] |
STR_String::STR_String | ( | dword | val | ) | [explicit] |
STR_String::STR_String | ( | float | val | ) | [explicit] |
STR_String::STR_String | ( | double | val | ) | [explicit] |
STR_String::~STR_String | ( | ) | [inline] |
Definition at line 90 of file STR_String.h.
void STR_String::AllocBuffer | ( | int | len, |
bool | keep_contents | ||
) | [protected] |
STR_String & STR_String::Capitalize | ( | ) |
void STR_String::Clear | ( | ) | [inline] |
Definition at line 95 of file STR_String.h.
Referenced by Explode().
int STR_String::Compare | ( | rcSTR_String | rhs | ) | const |
Definition at line 480 of file STR_String.cpp.
References pData.
int STR_String::CompareNoCase | ( | rcSTR_String | rhs | ) | const |
Definition at line 490 of file STR_String.cpp.
References pData.
rcSTR_String STR_String::Concat | ( | const char * | data, |
int | len | ||
) | [protected] |
Definition at line 686 of file STR_String.cpp.
References AllocBuffer(), assertd, len(), Len, NULL, and pData.
rcSTR_String STR_String::Copy | ( | const char * | src, |
int | len | ||
) | [protected] |
Definition at line 667 of file STR_String.cpp.
References AllocBuffer(), assertd, len(), Len, NULL, and pData.
vector< STR_String > STR_String::Explode | ( | char | c | ) | const |
Definition at line 705 of file STR_String.cpp.
References Clear(), Find(), Left(), Length(), and Mid().
Referenced by main(), and KX_Dome::ParseWarpMesh().
int STR_String::Find | ( | char | c, |
int | pos = 0 |
||
) | const |
Definition at line 353 of file STR_String.cpp.
References assertd, Len, NULL, and pData.
Referenced by Explode(), and CValue::FindIdentifier().
int STR_String::Find | ( | rcSTR_String | str, |
int | pos = 0 |
||
) | const |
int STR_String::Find | ( | const char * | str, |
int | pos = 0 |
||
) | const |
int STR_String::FindOneOf | ( | const char * | set, |
int | pos = 0 |
||
) | const |
STR_String & STR_String::Format | ( | const char * | fmt, |
... | |||
) |
Definition at line 273 of file STR_String.cpp.
References AllocBuffer(), assertd, Len, NULL, and pData.
Referenced by CFloatValue::GetText(), CIntValue::GetText(), and GPC_Engine::UpdateLoadingAnimation().
STR_String & STR_String::FormatAdd | ( | const char * | fmt, |
... | |||
) |
Definition at line 293 of file STR_String.cpp.
References AllocBuffer(), assertd, Len, NULL, and pData.
char STR_String::GetAt | ( | int | pos | ) | const [inline] |
bool STR_String::IsEmpty | ( | ) | const [inline] |
Definition at line 105 of file STR_String.h.
Referenced by KX_TouchSensor::BroadPhaseSensorFilterCollision(), NG_NetworkScene::ConstraintsAreValid(), ConvertMaterial(), NG_NetworkScene::FindMessages(), KX_TouchSensor::NewHandleCollision(), KX_ConstraintActuator::RayHit(), and BL_BlenderShader::SetAttribs().
bool STR_String::IsEqual | ( | rcSTR_String | rhs | ) | const [inline] |
Definition at line 125 of file STR_String.h.
bool STR_String::IsEqualNoCase | ( | rcSTR_String | rhs | ) | const [inline] |
Definition at line 126 of file STR_String.h.
bool STR_String::IsLower | ( | ) | const |
static bool STR_String::isLower | ( | char | c | ) | [inline, static, protected] |
Definition at line 197 of file STR_String.h.
Referenced by IsUpper().
static bool STR_String::isSpace | ( | char | c | ) | [inline, static, protected] |
Definition at line 199 of file STR_String.h.
Referenced by TrimLeft(), and TrimRight().
bool STR_String::IsUpper | ( | ) | const |
static bool STR_String::isUpper | ( | char | c | ) | [inline, static, protected] |
Definition at line 198 of file STR_String.h.
Referenced by IsLower().
STR_String STR_String::Left | ( | int | num | ) | const [inline] |
Definition at line 118 of file STR_String.h.
Referenced by Explode(), and CValue::FindIdentifier().
int STR_String::Length | ( | ) | const [inline] |
Definition at line 106 of file STR_String.h.
Referenced by KX_NearSensor::BroadPhaseFilterCollision(), Explode(), CValue::FindIdentifier(), GHOST_WindowCarbon::gen2mac(), SCA_ILogicBrick::GetText(), CParser::GetValue(), GHOST_GetTitle(), GHOST_WindowX11::GHOST_WindowX11(), STR_HashedString::hash(), KX_RaySensor::NeedRayCast(), operator+(), operator+=(), operator=(), KX_RaySensor::RayHit(), KX_BlenderRenderTools::RenderText(), GPC_RenderTools::RenderText(), Replace(), GHOST_WindowX11::setTitle(), split_string(), and KX_SceneActuator::Update().
STR_String & STR_String::Lower | ( | ) |
STR_String STR_String::Mid | ( | int | pos, |
int | num = INT_MAX |
||
) | const [inline] |
Definition at line 120 of file STR_String.h.
Referenced by Explode(), and split_string().
STR_String::operator const char * | ( | ) | const [inline] |
Definition at line 152 of file STR_String.h.
rcSTR_String STR_String::operator+= | ( | rcSTR_String | rhs | ) | [inline] |
Definition at line 165 of file STR_String.h.
rcSTR_String STR_String::operator+= | ( | const char * | rhs | ) | [inline] |
Definition at line 164 of file STR_String.h.
References strlen().
rcSTR_String STR_String::operator+= | ( | char | rhs | ) | [inline] |
Definition at line 166 of file STR_String.h.
rcSTR_String STR_String::operator= | ( | const byte * | rhs | ) | [inline] |
Definition at line 159 of file STR_String.h.
References strlen().
rcSTR_String STR_String::operator= | ( | char | rhs | ) | [inline] |
Definition at line 161 of file STR_String.h.
rcSTR_String STR_String::operator= | ( | rcSTR_String | rhs | ) | [inline] |
Definition at line 160 of file STR_String.h.
rcSTR_String STR_String::operator= | ( | const char * | rhs | ) | [inline] |
Definition at line 162 of file STR_String.h.
References strlen().
char* STR_String::Ptr | ( | ) | [inline] |
Definition at line 153 of file STR_String.h.
Referenced by BL_ConvertActuators(), KX_TouchSensor::BroadPhaseSensorFilterCollision(), KX_KetsjiEngine::ConvertAndAddScene(), SCA_IActuator::DecLink(), SCA_ISensor::DecLink(), RAS_2DFilterManager::EnableFilter(), GHOST_WindowCarbon::gen2mac(), GHOST_GetTitle(), SCA_ISensor::Init(), main(), KX_TouchSensor::NewHandleCollision(), KX_ConstraintActuator::RayHit(), GPG_Application::startEngine(), and StartKetsjiShell().
const char* STR_String::ReadPtr | ( | ) | const [inline] |
Definition at line 154 of file STR_String.h.
Referenced by BL_Shader::BindAttribute(), KX_NavMeshObject::BuildNavMesh(), SCA_PropertySensor::CheckPropertyCondition(), ConvertMaterial(), Find(), KX_BlenderSceneConverter::FreeBlendFile(), BL_Shader::GetAttribLocation(), KX_BlenderSceneConverter::GetBlenderSceneForName(), getMaterialID(), BL_Shader::GetUniformLocation(), operator+(), operator+=(), operator=(), KX_Scene::RemoveNodeDestructObject(), Replace(), NG_LoopBackNetworkDeviceInterface::SendNetworkMessage(), BL_BlenderShader::SetAttribs(), GHOST_WindowX11::setTitle(), GHOST_WindowSDL::setTitle(), SCA_ExpressionController::Trigger(), SCA_IController::UnlinkActuator(), SCA_ISensor::UnlinkController(), SCA_IActuator::UnlinkController(), and SCA_IController::UnlinkSensor().
void STR_String::Replace | ( | int | pos, |
rcSTR_String | str | ||
) |
Definition at line 421 of file STR_String.cpp.
References AllocBuffer(), Len, Length(), pData, and ReadPtr().
void STR_String::Replace | ( | int | pos, |
int | num, | ||
rcSTR_String | str | ||
) |
Definition at line 446 of file STR_String.cpp.
References AllocBuffer(), assertd, Len, Length(), pData, and ReadPtr().
const STR_String& STR_String::Reverse | ( | ) | [inline] |
Definition at line 96 of file STR_String.h.
References swap().
int STR_String::RFind | ( | char | c | ) | const |
Definition at line 395 of file STR_String.cpp.
int STR_String::RFindOneOf | ( | const char * | set, |
int | pos = 0 |
||
) | const |
STR_String STR_String::Right | ( | int | num | ) | const [inline] |
Definition at line 119 of file STR_String.h.
Referenced by CValue::FindIdentifier().
void STR_String::SetAt | ( | int | pos, |
char | c | ||
) | [inline] |
Definition at line 111 of file STR_String.h.
References assertd.
void STR_String::SetAt | ( | int | pos, |
int | num, | ||
rcSTR_String | str | ||
) | [inline] |
void STR_String::SetAt | ( | int | pos, |
rcSTR_String | str | ||
) | [inline] |
STR_String& STR_String::SetLength | ( | int | len | ) | [inline] |
Definition at line 109 of file STR_String.h.
References len().
float STR_String::ToFloat | ( | ) | const [inline] |
Definition at line 155 of file STR_String.h.
int STR_String::ToInt | ( | ) | const [inline] |
Definition at line 156 of file STR_String.h.
STR_String & STR_String::Trim | ( | ) |
Definition at line 592 of file STR_String.cpp.
References TrimLeft(), and TrimRight().
STR_String & STR_String::Trim | ( | char * | set | ) |
Definition at line 632 of file STR_String.cpp.
References TrimLeft(), and TrimRight().
STR_String & STR_String::TrimLeft | ( | char * | set | ) |
STR_String & STR_String::TrimLeft | ( | ) |
STR_String & STR_String::TrimQuotes | ( | ) |
STR_String & STR_String::TrimRight | ( | ) |
STR_String & STR_String::TrimRight | ( | char * | set | ) |
STR_String & STR_String::Upper | ( | ) |
Definition at line 510 of file STR_String.cpp.
References assertd, i, Len, NULL, and pData.
Referenced by SCA_PropertySensor::CheckPropertyCondition().
bool operator!= | ( | rcSTR_String | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 184 of file STR_String.h.
bool operator!= | ( | rcSTR_String | lhs, |
const char * | rhs | ||
) | [friend] |
Definition at line 185 of file STR_String.h.
bool operator!= | ( | const char * | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 186 of file STR_String.h.
bool operator< | ( | rcSTR_String | lhs, |
const char * | rhs | ||
) | [friend] |
Definition at line 170 of file STR_String.h.
bool operator< | ( | rcSTR_String | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 169 of file STR_String.h.
bool operator< | ( | const char * | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 171 of file STR_String.h.
bool operator<= | ( | const char * | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 177 of file STR_String.h.
bool operator<= | ( | rcSTR_String | lhs, |
const char * | rhs | ||
) | [friend] |
Definition at line 176 of file STR_String.h.
bool operator<= | ( | rcSTR_String | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 175 of file STR_String.h.
bool operator== | ( | const char * | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 183 of file STR_String.h.
bool operator== | ( | rcSTR_String | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 181 of file STR_String.h.
bool operator== | ( | rcSTR_String | lhs, |
const char * | rhs | ||
) | [friend] |
Definition at line 182 of file STR_String.h.
bool operator> | ( | rcSTR_String | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 172 of file STR_String.h.
bool operator> | ( | const char * | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 174 of file STR_String.h.
bool operator> | ( | rcSTR_String | lhs, |
const char * | rhs | ||
) | [friend] |
Definition at line 173 of file STR_String.h.
bool operator>= | ( | rcSTR_String | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 178 of file STR_String.h.
bool operator>= | ( | const char * | lhs, |
rcSTR_String | rhs | ||
) | [friend] |
Definition at line 180 of file STR_String.h.
bool operator>= | ( | rcSTR_String | lhs, |
const char * | rhs | ||
) | [friend] |
Definition at line 179 of file STR_String.h.
int STR_String::Len [protected] |
Definition at line 202 of file STR_String.h.
Referenced by AllocBuffer(), Capitalize(), Concat(), Copy(), Find(), FindOneOf(), Format(), FormatAdd(), IsLower(), IsUpper(), Lower(), Replace(), STR_String(), TrimLeft(), TrimQuotes(), TrimRight(), and Upper().
int STR_String::Max [protected] |
Definition at line 203 of file STR_String.h.
Referenced by AllocBuffer(), and STR_String().
char* STR_String::pData [protected] |
Definition at line 201 of file STR_String.h.
Referenced by AllocBuffer(), Capitalize(), Compare(), CompareNoCase(), Concat(), Copy(), Find(), FindOneOf(), Format(), FormatAdd(), IsLower(), IsUpper(), Lower(), Replace(), RFind(), STR_String(), TrimLeft(), TrimQuotes(), TrimRight(), and Upper().