|
SNAP Library 2.1, Developer Reference
2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <dt.h>
Public Member Functions | |
| TRStr () | |
| TRStr (const int &Len) | |
| TRStr (const char *CStr) | |
| TRStr (const char *CStr, const int &MxLen) | |
| TRStr (const char *CStr1, const char *CStr2) | |
| TRStr (const char &Ch) | |
| TRStr (const char &Ch1, const char &Ch2) | |
| ~TRStr () | |
| TRStr (TSIn &SIn, const bool &IsSmall) | |
| void | Save (TSOut &SOut, const bool &IsSmall) const |
| TRStr & | operator= (const TRStr &) |
| int | GetMemUsed () const |
| void | MkRef () |
| void | UnRef () |
| const char * | CStr () const |
| char * | CStr () |
| bool | Empty () const |
| int | Len () const |
| void | PutCh (const int &ChN, const char &Ch) |
| char | GetCh (const int &ChN) const |
| bool | IsUc () const |
| void | ToUc () |
| bool | IsLc () const |
| void | ToLc () |
| void | ToCap () |
| void | ConvUsFromYuAscii () |
| int | GetPrimHashCd () const |
| int | GetSecHashCd () const |
Static Public Member Functions | |
| static int | CmpI (const char *CStr1, const char *CStr2) |
| static TRStr * | GetNullRStr () |
Public Attributes | |
| char * | Bf |
| int | Refs |
| TRStr::TRStr | ( | ) | [inline] |
| TRStr::TRStr | ( | const int & | Len | ) | [inline] |
| TRStr::TRStr | ( | const char * | CStr | ) | [inline] |
| TRStr::TRStr | ( | const char * | CStr, |
| const int & | MxLen | ||
| ) | [inline] |
| TRStr::TRStr | ( | const char * | CStr1, |
| const char * | CStr2 | ||
| ) | [inline] |
| TRStr::TRStr | ( | const char & | Ch | ) | [inline] |
| TRStr::TRStr | ( | const char & | Ch1, |
| const char & | Ch2 | ||
| ) | [inline] |
| TRStr::~TRStr | ( | ) | [inline] |
Definition at line 365 of file dt.h.
References Assert, Bf, GetNullRStr(), and Refs.
{
Assert(((this!=GetNullRStr())&&(Refs==0))||((this==GetNullRStr())&&(Refs==1)));
delete[] Bf;}

| TRStr::TRStr | ( | TSIn & | SIn, |
| const bool & | IsSmall | ||
| ) | [inline, explicit] |
| int TRStr::CmpI | ( | const char * | CStr1, |
| const char * | CStr2 | ||
| ) | [static] |
| void TRStr::ConvUsFromYuAscii | ( | ) |
Definition at line 693 of file dt.cpp.
References Bf, TCh::GetUsFromYuAscii(), and Len().
Referenced by TStr::ConvUsFromYuAscii().
{
int StrLen=Len();
for (int ChN=0; ChN<StrLen; ChN++){
Bf[ChN]=TCh::GetUsFromYuAscii(Bf[ChN]);}
}


| const char* TRStr::CStr | ( | ) | const [inline] |
Definition at line 381 of file dt.h.
References Bf.
Referenced by TStr::ChangeChAll(), TStr::ConvUsFromYuAscii(), TStr::CStr(), TStr::operator!=(), TStr::operator()(), TStr::operator+=(), TStr::operator<(), TStr::operator==(), TStr::Optimize(), TStr::PutCh(), TStr::ToCap(), TStr::ToLc(), and TStr::ToUc().
{return Bf;}

| char* TRStr::CStr | ( | ) | [inline] |
| bool TRStr::Empty | ( | ) | const [inline] |
Definition at line 383 of file dt.h.
References Bf.
Referenced by TStr::Empty().
{return Bf[0]==0;}

| char TRStr::GetCh | ( | const int & | ChN | ) | const [inline] |
Definition at line 388 of file dt.h.
References Assert, Bf, and Len().
Referenced by TStr::GetCh(), and TStr::operator[]().


| int TRStr::GetMemUsed | ( | ) | const [inline] |
Definition at line 376 of file dt.h.
References Bf.
Referenced by TStr::GetMemUsed().
{return int(sizeof(int))+int(strlen(Bf));}

| static TRStr* TRStr::GetNullRStr | ( | ) | [inline, static] |
Definition at line 402 of file dt.h.
Referenced by TStr::Clr(), TStr::GetRStr(), TStr::Optimize(), TStr::TStr(), and ~TRStr().

| int TRStr::GetPrimHashCd | ( | ) | const |
Definition at line 709 of file dt.cpp.
References Bf.
Referenced by TStr::GetPrimHashCd().
{
return TStrHashF_DJB::GetPrimHashCd(Bf);
}

| int TRStr::GetSecHashCd | ( | ) | const |
Definition at line 713 of file dt.cpp.
References Bf.
Referenced by TStr::GetSecHashCd().
{
return TStrHashF_DJB::GetSecHashCd(Bf);
}

| bool TRStr::IsLc | ( | ) | const |
| bool TRStr::IsUc | ( | ) | const |
| int TRStr::Len | ( | ) | const [inline] |
| void TRStr::MkRef | ( | ) | [inline] |
Definition at line 378 of file dt.h.
References Refs.
Referenced by TStr::ChangeChAll(), TStr::Clr(), TStr::ConvUsFromYuAscii(), TStr::operator+=(), TStr::operator=(), TStr::Optimize(), TStr::PutCh(), TStr::ToCap(), TStr::ToLc(), TStr::ToUc(), and TStr::TStr().
{Refs++;}

| void TRStr::PutCh | ( | const int & | ChN, |
| const char & | Ch | ||
| ) | [inline] |
| void TRStr::Save | ( | TSOut & | SOut, |
| const bool & | IsSmall | ||
| ) | const [inline] |
| void TRStr::ToCap | ( | ) |
| void TRStr::ToLc | ( | ) |
| void TRStr::ToUc | ( | ) |
| void TRStr::UnRef | ( | ) | [inline] |
Definition at line 379 of file dt.h.
Referenced by TStr::ChangeChAll(), TStr::Clr(), TStr::ConvUsFromYuAscii(), TStr::operator+=(), TStr::operator=(), TStr::Optimize(), TStr::PutCh(), TStr::ToCap(), TStr::ToLc(), TStr::ToUc(), and TStr::~TStr().

| char* TRStr::Bf |
Definition at line 348 of file dt.h.
Referenced by ConvUsFromYuAscii(), CStr(), Empty(), TStr::FromHex(), GetCh(), GetMemUsed(), GetNullRStr(), GetPrimHashCd(), GetSecHashCd(), IsLc(), TStr::IsPrefix(), TStr::IsSuffix(), IsUc(), Len(), PutCh(), Save(), ToCap(), TStr::ToHex(), ToLc(), ToUc(), TRStr(), and ~TRStr().
| int TRStr::Refs |