SNAP Library, Developer Reference  2012-10-02 12:56:23
SNAP, a general purpose network analysis and graph mining library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
dt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TRnd
class  TMemIn
class  TMemOut
class  TChA
class  TChAIn
class  TRStr
class  TStr
class  TStrIn
class  TDbStr
class  TVoid
class  TBool
class  TCh
class  TUCh
class  TSInt
class  TInt
class  TUInt
class  TUInt64
class  TFlt
class  TAscFlt
class  TSFlt
class  TLFlt
class  TFltRect

Typedefs

typedef TVec< TStrTStrV

Functions

 ClassHdTP (TXmlTok, PXmlTok)
void Resize (const int &_MxBfL)
bool DoFitLen (const int &LBfL) const
 TMem (const int &_MxBfL=0)
static PMem New (const int &MxBfL=0)
 TMem (const void *_Bf, const int &_BfL)
static PMem New (const void *Bf, const int &BfL)
 TMem (const TMem &Mem)
static PMem New (const TMem &Mem)
static PMem New (const PMem &Mem)
 TMem (const TStr &Str)
static PMem New (const TStr &Str)
 ~TMem ()
 TMem (TSIn &SIn)
void Save (TSOut &SOut) const
void LoadXml (const PXmlTok &XmlTok, const TStr &Nm)
void SaveXml (TSOut &SOut, const TStr &Nm) const
TMemoperator= (const TMem &Mem)
char * operator() () const
TMemoperator+= (const char &Ch)
TMemoperator+= (const TMem &Mem)
TMemoperator+= (const TStr &Str)
TMemoperator+= (const PSIn &SIn)
char & operator[] (const int &ChN) const
int GetMemUsed () const
void Gen (const int &_BfL)
void GenZeros (const int &_BfL)
void Reserve (const int &_MxBfL, const bool &DoClr=true)
void Del (const int &BChN, const int &EChN)
void Clr (const bool &DoDel=true)
int Len () const
bool Empty () const
void Trunc (const int &_BfL)
void Push (const char &Ch)
char Pop ()
bool DoFitStr (const TStr &Str) const
void AddBf (const void *Bf, const int &BfL)
char * GetBf () const
TStr GetAsStr (const char &NewNullCh='\0') const
PSIn GetSIn () const
static void LoadMem (const PSIn &SIn, TMem &Mem)
static void LoadMem (const PSIn &SIn, const PMem &Mem)
void SaveMem (const PSOut &SOut) const
void Resize (uint _MxBfL)
 TStrPool (uint MxBfLen=0, uint _GrowBy=16 *1024 *1024)
 TStrPool (TSIn &SIn, bool LoadCompact=true)
 TStrPool (const TStrPool &Pool)
 ~TStrPool ()
static PStrPool New (uint _MxBfLen=0, uint _GrowBy=16 *1024 *1024)
static PStrPool New (TSIn &SIn)
static PStrPool Load (TSIn &SIn, bool LoadCompacted=true)
void Save (const TStr &FNm)
uint Size () const
TStrPooloperator= (const TStrPool &Pool)
uint AddStr (const char *Str, uint Len)
uint AddStr (const char *Str)
uint AddStr (const TStr &Str)
TStr GetStr (uint Offset) const
const char * GetCStr (uint Offset) const
void Clr (bool DoDel=false)
int Cmp (uint Offset, const char *Str) const
static int GetPrimHashCd (const char *CStr)
static int GetSecHashCd (const char *CStr)
int GetPrimHashCd (uint Offset)
int GetSecHashCd (uint Offset)
void Resize (const ::TSize &_MxBfL)
 TStrPool64 (::TSize _MxBfL=0,::TSize _GrowBy=16 *1024 *1024)
 TStrPool64 (const TStrPool64 &StrPool)
 TStrPool64 (TSIn &SIn, bool LoadCompact=true)
 ~TStrPool64 ()
static PStrPool64 New (::TSize MxBfL=0,::TSize GrowBy=16 *1024 *1024)
TStrPool64operator= (const TStrPool64 &StrPool)
uint64 Reserved () const
int Cmp (uint64 Offset, const char *Str) const
TStr GetStr (const uint64 &StrId) const

Variables

ClassTP(TMem, PMem) private char * Bf

Typedef Documentation

typedef TVec<TStr> TStrV

Definition at line 394 of file dt.h.


Function Documentation

void TMem::AddBf ( const void *  Bf,
const int &  BfL 
)

Definition at line 279 of file dt.cpp.

References Bf, IAssert, Len(), and Reserve().

                                                {
        IAssert((_BfL>=0) && (_Bf != NULL));
  Reserve(Len() + _BfL, false);
  memcpy(Bf + BfL, _Bf, _BfL);  
   BfL+=_BfL;
  //char* ChBf=(char*)Bf;
  //for (int BfC=0; BfC<BfL; BfC++){
  //  char Ch=ChBf[BfC];
  //  operator+=(Ch);
  //}
}

Here is the call graph for this function:

int TBigStrPool::AddStr ( const char *  Str,
uint  Len 
)

Definition at line 1680 of file dt.cpp.

References Assert, Bf, IAssertR, Len(), and Resize().

Referenced by AddStr(), TBigStrPool(), TStrPool(), and TStrPool64().

                                               {
  IAssertR(Len > 0, "String too short (length includes the null character)");  //J: if (! Len) return -1;
  if (Len == 1 && BfL > 0) { return 0; } // empty string
  Assert(Str);  Assert(Len > 0);
  if (BfL + Len > MxBfL) Resize(BfL + Len);
  memcpy(Bf + BfL, Str, Len);
  uint Pos = BfL;  BfL += Len;  return Pos;
}

Here is the call graph for this function:

Here is the caller graph for this function:

uint AddStr ( const char *  Str)

Definition at line 790 of file dt.h.

References AddStr().

{ return AddStr(Str, uint(strlen(Str)) + 1); }

Here is the call graph for this function:

uint64 AddStr ( const TStr Str)

Definition at line 791 of file dt.h.

References AddStr(), TStr::CStr(), and TStr::Len().

{ return AddStr(Str.CStr(), Str.Len() + 1); }

Here is the call graph for this function:

ClassHdTP ( TXmlTok  ,
PXmlTok   
)
void Clr ( const bool &  DoDel = true)

Definition at line 121 of file dt.h.

References Bf.

                                  {
    if (DoDel){if (Bf!=NULL){delete[] Bf;} MxBfL=0; BfL=0; Bf=NULL;}
    else {BfL=0;}}
void Clr ( bool  DoDel = false)

Definition at line 800 of file dt.h.

References Bf.

{ BfL = 0; if (DoDel && Bf) { free(Bf); Bf = 0; MxBfL = 0; } }
int Cmp ( uint  Offset,
const char *  Str 
) const

Definition at line 801 of file dt.h.

References Assert, and Bf.

                                              { Assert(Offset < BfL);
    if (Offset != 0) return strcmp(Bf + Offset, Str); else return strcmp("", Str); }
int Cmp ( uint64  Offset,
const char *  Str 
) const

Definition at line 840 of file dt.h.

References Assert, and Bf.

                                                { Assert(Offset < BfL);
    if (Offset != 0) return strcmp(Bf + Offset, Str); else return strcmp("", Str); }
void Del ( const int &  BChN,
const int &  EChN 
)
bool DoFitLen ( const int &  LBfL) const

Definition at line 72 of file dt.h.

Referenced by DoFitStr().

{return BfL+LBfL<=MxBfL;}

Here is the caller graph for this function:

bool TMem::DoFitStr ( const TStr Str) const

Definition at line 235 of file dt.cpp.

References DoFitLen(), and TStr::Len().

                                         {
  return DoFitLen(Str.Len()+1);
}

Here is the call graph for this function:

bool Empty ( ) const

Definition at line 125 of file dt.h.

{return BfL==0;}
void Gen ( const int &  _BfL)

Definition at line 113 of file dt.h.

References Clr(), and Resize().

Referenced by TCliqueOverlap::CalculateOverlapMtx(), TVec< TVal >::LoadXml(), and TBSet().

                           {
    Clr(); Resize(_BfL); BfL=_BfL;}

Here is the call graph for this function:

Here is the caller graph for this function:

void GenZeros ( const int &  _BfL)

Definition at line 115 of file dt.h.

References Bf, Clr(), and Resize().

                                {
    Clr(false); Resize(_BfL); BfL=_BfL;
    if (BfL > 0) memset(Bf, 0, BfL);}

Here is the call graph for this function:

TStr GetAsStr ( const char &  NewNullCh = '\0') const
char* GetBf ( ) const

Definition at line 134 of file dt.h.

References Bf.

Referenced by GetCh(), GetCs(), GetHd(), GetInt(), GetRec(), GetUCh(), and GetUInt().

{return Bf;}

Here is the caller graph for this function:

const char* GetCStr ( uint  Offset) const

Definition at line 795 of file dt.h.

References Assert, Bf, TStr::CStr(), and TStr::GetNullStr().

Referenced by TMAGFitBern::RandomInit(), and TMAGFitBern::UpdateAffMtx().

                                         { Assert(Offset < BfL);
    if (Offset == 0) return TStr::GetNullStr().CStr(); else return Bf + Offset; }

Here is the call graph for this function:

Here is the caller graph for this function:

int GetMemUsed ( ) const

Definition at line 111 of file dt.h.

{return 2*sizeof(int)+sizeof(char*)+MxBfL;}
static int GetPrimHashCd ( const char *  CStr) [static]
int GetPrimHashCd ( uint  Offset)

Definition at line 806 of file dt.h.

References Assert, Bf, and GetPrimHashCd().

                                 { Assert(Offset < BfL);
    if (Offset != 0) return GetPrimHashCd(Bf + Offset); else return GetPrimHashCd(""); }

Here is the call graph for this function:

static int GetSecHashCd ( const char *  CStr) [static]
int GetSecHashCd ( uint  Offset)

Definition at line 808 of file dt.h.

References Assert, Bf, and GetSecHashCd().

                                { Assert(Offset < BfL);
    if (Offset != 0) return GetSecHashCd(Bf + Offset); else return GetSecHashCd(""); }

Here is the call graph for this function:

PSIn GetSIn ( ) const

Definition at line 136 of file dt.h.

References Bf, TMOut::GetSIn(), and TSOut::SaveBf().

                      {
    TMOut MOut(BfL); MOut.SaveBf(Bf, BfL); return MOut.GetSIn();}

Here is the call graph for this function:

TStr GetStr ( uint  Offset) const

Definition at line 793 of file dt.h.

References Assert, Bf, and TStr::GetNullStr().

                                 { Assert(Offset < BfL);
    if (Offset == 0) return TStr::GetNullStr(); else return TStr(Bf + Offset); }

Here is the call graph for this function:

TStr GetStr ( const uint64 StrId) const
uint64 Len ( ) const

Definition at line 124 of file dt.h.

Referenced by AddBf(), TBigNet< TNodeData, IsDir >::AddSorted(), TVec< TVal >::AddSorted(), AddStr(), TVec< TVal >::AddV(), TVec< TVal >::AddVMerged(), TVecPool< TVal >::CompactPool(), TVec< TVal >::Count(), TVec< TVal >::Diff(), TStrHashF_DJB::DJBHash(), TLinAlg::DotProduct(), Empty(), TLAMisc::FillIdentity(), TLAMisc::FillRnd(), TAGM::GenAGM(), GenBlockLenV(), TSnap::GetBiConSzCnt(), THash< TKey, TDat, THashFunc >::GetDatKeyKdV(), THash< TKey, TDat, THashFunc >::GetDatKeyPrV(), TSparseHash< TKey, TDat, GroupSize >::GetDatKeyPrV(), TStrHash< TDat, TStringPool, THashFunc >::GetDatKeyPrV(), THash< TKey, TDat, THashFunc >::GetDatV(), TSparseHash< TKey, TDat, GroupSize >::GetDatV(), TStrHash< TDat, TStringPool, THashFunc >::GetDatV(), THash< TKey, TDat, THashFunc >::GetKeyDatKdV(), THash< TKey, TDat, THashFunc >::GetKeyDatPrV(), TSparseHash< TKey, TDat, GroupSize >::GetKeyDatPrV(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyDatPrV(), TGHash< TDat >::GetKeyIdByDat(), TGHash< TDat >::GetKeyIdByGSz(), THash< TKey, TDat, THashFunc >::GetKeyV(), TSparseHash< TKey, TDat, GroupSize >::GetKeyV(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyV(), TSparseSet< TKey, GroupSize >::GetKeyV(), TSnap::GetMxBiCon(), TSnap::GetMxScc(), TSnap::GetMxWcc(), THash< TKey, TDat, THashFunc >::GetRndKeyId(), TUrlLx::GetStr(), TStrHash< TDat, TStringPool, THashFunc >::GetStrIdV(), TVec< TVal >::GetSubValV(), TVec< TVal >::Intrs(), TVec< TVal >::IntrsLen(), IsCmt(), TLinAlg::LinComb(), TLAMisc::LoadMatlabTFltVV(), LogSumExp(), MemCpy(), MemSet(), TLinAlg::MultiplyScalar(), TVec< TVal >::NextPerm(), TLinAlg::NormL1(), TLinAlg::NormLinf(), TVec< TVal >::operator<(), THash< TKey, TDat, THashFunc >::operator==(), TVec< TVal >::operator==(), THashSet< TKey, THashFunc >::operator==(), TVec< TVal >::PrevPerm(), TSparseHash< TKey, TDat, GroupSize >::ResizeDelta(), TSparseSet< TKey, GroupSize >::ResizeDelta(), TBigNet< TNodeData, IsDir >::Rewire(), TLAMisc::SaveMatlabTFltIntKdV(), SaveMem(), TVec< TVal >::SearchBin(), THash< TKey, TDat, THashFunc >::Sort(), TVec< TVal >::Sort(), TLAMisc::SumVec(), TUniChDb::TestComposition(), TFullColMatrix::TFullColMatrix(), and TVec< TVal >::Union().

{return BfL;}

Here is the caller graph for this function:

static PStrPool64 Load ( TSIn SIn,
bool  LoadCompacted = true 
) [static]

Definition at line 779 of file dt.h.

References TStrPool().

{ return PStrPool(new TStrPool(SIn, LoadCompacted)); }

Here is the call graph for this function:

static void LoadMem ( const PSIn SIn,
TMem Mem 
) [static]

Definition at line 139 of file dt.h.

References TSIn::GetBf(), and TSIn::Len().

Referenced by THttpLx::GetRest(), and THttpResp().

                                                 {
    Mem.Clr(); Mem.Gen(SIn->Len()); SIn->GetBf(Mem.Bf, SIn->Len());}

Here is the call graph for this function:

Here is the caller graph for this function:

static void LoadMem ( const PSIn SIn,
const PMem &  Mem 
) [static]

Definition at line 141 of file dt.h.

References TSIn::GetBf(), and TSIn::Len().

                                                       {
    Mem->Clr(); Mem->Gen(SIn->Len()); SIn->GetBf(Mem->Bf, SIn->Len());}

Here is the call graph for this function:

void LoadXml ( const PXmlTok XmlTok,
const TStr Nm 
)

Referenced by LoadXml().

Here is the caller graph for this function:

static PMem New ( const int &  MxBfL = 0) [static]

Definition at line 77 of file dt.h.

References TMem().

{return new TMem(MxBfL);}

Here is the call graph for this function:

static PMem New ( const void *  Bf,
const int &  BfL 
) [static]

Definition at line 81 of file dt.h.

References TMem().

{return new TMem(Bf, BfL);}

Here is the call graph for this function:

static PMem New ( const TMem Mem) [static]

Definition at line 85 of file dt.h.

References TMem().

{return new TMem(Mem);}

Here is the call graph for this function:

static PMem New ( const PMem &  Mem) [static]

Definition at line 86 of file dt.h.

References TMem().

{return new TMem(*Mem);}

Here is the call graph for this function:

static PStrPool New ( const TStr Str) [static]

Definition at line 88 of file dt.h.

References TMem().

{return new TMem(Str);}

Here is the call graph for this function:

static PStrPool New ( uint  _MxBfLen = 0,
uint  _GrowBy = 16*1024*1024 
) [static]

Definition at line 776 of file dt.h.

References TStrPool().

{ return PStrPool(new TStrPool(_MxBfLen, _GrowBy)); }

Here is the call graph for this function:

static PStrPool New ( TSIn SIn) [static]

Definition at line 777 of file dt.h.

References TStrPool().

{ return new TStrPool(SIn); }

Here is the call graph for this function:

static PStrPool64 New ( ::TSize  MxBfL = 0,
::TSize  GrowBy = 16*1024*1024 
) [static]

Definition at line 827 of file dt.h.

References GrowBy, and TStrPool64().

                                                                      { 
      return PStrPool64(new TStrPool64(MxBfL, GrowBy)); }

Here is the call graph for this function:

char * operator() ( ) const

Definition at line 104 of file dt.h.

References Bf.

Referenced by TGStat::TCmpByVal::operator()().

{return Bf;}

Here is the caller graph for this function:

TMem& operator+= ( const char &  Ch)

Referenced by Push().

Here is the caller graph for this function:

TMem& operator+= ( const TMem Mem)
TMem& operator+= ( const TStr Str)
TMem& operator+= ( const PSIn SIn)
TMem& operator= ( const TMem Mem)

Definition at line 98 of file dt.h.

References Bf.

                                  {
    if (this!=&Mem){
      if (Bf!=NULL){delete[] Bf;}
      MxBfL=Mem.MxBfL; BfL=Mem.BfL; Bf=NULL;
      if (MxBfL>0){Bf=new char[MxBfL]; memcpy(Bf, Mem.Bf, BfL);}}
    return *this;}
TStrPool& operator= ( const TStrPool Pool)
TStrPool64& operator= ( const TStrPool64 StrPool)
char * operator[] ( const int &  ChN) const

Definition at line 109 of file dt.h.

References Assert, and Bf.

                                         {
    Assert((0<=ChN)&&(ChN<BfL)); return Bf[ChN];}
char Pop ( )

Definition at line 129 of file dt.h.

References Bf, and IAssert.

{IAssert(BfL>0); BfL--; return Bf[BfL];}
void Push ( const char &  Ch)

Definition at line 128 of file dt.h.

References operator+=().

{operator+=(Ch);}

Here is the call graph for this function:

void Reserve ( const int &  _MxBfL,
const bool &  DoClr = true 
)

Definition at line 118 of file dt.h.

References Clr(), and Resize().

Referenced by AddBf().

                                                           {
          if (DoClr){ Clr(); } Resize(_MxBfL);}

Here is the call graph for this function:

Here is the caller graph for this function:

void Resize ( uint  _MxBfL) [private]
void Resize ( const ::TSize _MxBfL) [private]
void Save ( TSOut SOut) const

Definition at line 93 of file dt.h.

References Bf, TSOut::Save(), and TSOut::SaveBf().

                               {
    SOut.Save(MxBfL); SOut.Save(BfL); SOut.SaveBf(Bf, BfL);}

Here is the call graph for this function:

void Save ( const TStr FNm)

Definition at line 781 of file dt.h.

References TFOut::New(), and Save().

{PSOut SOut=TFOut::New(FNm); Save(*SOut);}

Here is the call graph for this function:

void SaveMem ( const PSOut SOut) const

Definition at line 143 of file dt.h.

References Bf, and Len().

{SOut->SaveBf(Bf, Len());}

Here is the call graph for this function:

void SaveXml ( TSOut SOut,
const TStr Nm 
) const
uint Size ( ) const

Definition at line 784 of file dt.h.

Referenced by TSparseHash< TKey, TDat, GroupSize >::GetMinSize(), and TSparseSet< TKey, GroupSize >::GetMinSize().

{ return MxBfL; }

Here is the caller graph for this function:

TMem ( const int &  _MxBfL = 0)

Definition at line 74 of file dt.h.

References Bf, and IAssert.

Referenced by THttpLx::GetRest(), New(), and TMemOut::PutBf().

                           :
    MxBfL(_MxBfL), BfL(0), Bf(NULL){ IAssert(BfL>=0);
    if (MxBfL>0){Bf=new char[MxBfL]; IAssert(Bf!=NULL);}}

Here is the caller graph for this function:

TMem ( const void *  _Bf,
const int &  _BfL 
)

Definition at line 78 of file dt.h.

References Bf, and IAssert.

                                        :
    MxBfL(_BfL), BfL(_BfL), Bf(NULL){ IAssert(BfL>=0);
    if (BfL>0){Bf=new char[BfL]; IAssert(Bf!=NULL); memcpy(Bf, _Bf, BfL);}}
TMem ( const TMem Mem)

Definition at line 82 of file dt.h.

References Bf.

                       :
    MxBfL(Mem.MxBfL), BfL(Mem.BfL), Bf(NULL){
    if (MxBfL>0){Bf=new char[MxBfL]; memcpy(Bf, Mem.Bf, BfL);}}
TMem::TMem ( const TStr Str)

Definition at line 222 of file dt.cpp.

References Bf, and TStr::CStr().

                         :
  MxBfL(Str.Len()), BfL(MxBfL), Bf(NULL){
  if (MxBfL>0){
    Bf=new char[MxBfL];
    if (BfL>0){memcpy(Bf, Str.CStr(), BfL);}
  }
}

Here is the call graph for this function:

TMem ( TSIn SIn) [explicit]

Definition at line 90 of file dt.h.

References Bf, TSIn::Load(), and TSIn::LoadBf().

                          {
    SIn.Load(MxBfL); SIn.Load(BfL);
    Bf=new char[MxBfL=BfL]; SIn.LoadBf(Bf, BfL);}

Here is the call graph for this function:

void Trunc ( const int &  _BfL)

Definition at line 126 of file dt.h.

                             {
    if ((0<=_BfL)&&(_BfL<=BfL)){BfL=_BfL;}}
TStrPool::TStrPool ( uint  MxBfLen = 0,
uint  _GrowBy = 16*1024*1024 
)

Definition at line 1648 of file dt.cpp.

References AddStr(), Bf, TStr::Fmt(), and IAssertR.

Referenced by Load(), TUniChDb::Load(), and New().

                                             : MxBfL(MxBfLen), BfL(0), GrowBy(_GrowBy), Bf(0) {
  //IAssert(MxBfL >= 0); IAssert(GrowBy >= 0);
  if (MxBfL > 0) { Bf = (char *) malloc(MxBfL);  IAssertR(Bf, TStr::Fmt("Can not resize buffer to %u bytes. [Program failed to allocate more memory. Solution: Get a bigger machine.]", MxBfL).CStr()); }
  AddStr(""); // add an empty string at the beginning for fast future access
}

Here is the call graph for this function:

Here is the caller graph for this function:

TStrPool::TStrPool ( TSIn SIn,
bool  LoadCompact = true 
)

Definition at line 1654 of file dt.cpp.

References Bf, TStr::Fmt(), GrowBy, IAssertR, TSIn::Load(), TSIn::LoadBf(), and TSIn::LoadCs().

                                              : MxBfL(0), BfL(0), GrowBy(0), Bf(0) {
  SIn.Load(MxBfL);  SIn.Load(BfL);  SIn.Load(GrowBy);
  //IAssert(MxBfL >= BfL);  IAssert(BfL >= 0);  IAssert(GrowBy >= 0);
  if (LoadCompact) MxBfL = BfL;
  if (MxBfL > 0) { Bf = (char *) malloc(MxBfL); IAssertR(Bf, TStr::Fmt("Can not resize buffer to %u bytes. [Program failed to allocate more memory. Solution: Get a bigger machine.]", MxBfL).CStr()); }
  if (BfL > 0) SIn.LoadBf(Bf, BfL);
  SIn.LoadCs();
}

Here is the call graph for this function:

TStrPool ( const TStrPool Pool)

Definition at line 772 of file dt.h.

References TStr::Fmt(), and IAssertR.

                                 : MxBfL(Pool.MxBfL), BfL(Pool.BfL), GrowBy(Pool.GrowBy) {
    Bf = (char *) malloc(Pool.MxBfL); IAssertR(Bf, TStr::Fmt("Can not resize buffer to %u bytes. [Program failed to allocate more memory. Solution: Get a bigger machine.]", MxBfL).CStr()); memcpy(Bf, Pool.Bf, Pool.BfL); }

Here is the call graph for this function:

TStrPool64::TStrPool64 ( ::TSize  _MxBfL = 0,
::TSize  _GrowBy = 16*1024*1024 
)

Definition at line 1715 of file dt.cpp.

References AddStr(), Bf, and IAssert.

Referenced by New().

                                                 :
        MxBfL(_MxBfL), BfL(0), GrowBy(_GrowBy), Bf(NULL) {

    if (MxBfL > 0) { Bf = (char*)malloc(MxBfL); IAssert(Bf != NULL); }
    AddStr("");
}

Here is the call graph for this function:

Here is the caller graph for this function:

TStrPool64::TStrPool64 ( const TStrPool64 StrPool)

Definition at line 1722 of file dt.cpp.

References Bf, and IAssert.

                                               : 
  MxBfL(StrPool.MxBfL), BfL(StrPool.BfL), GrowBy(StrPool.GrowBy) {
    if (Bf != NULL) { free(Bf); } else { IAssert(MxBfL == 0); }
    Bf = (char*)malloc(StrPool.MxBfL); IAssert(Bf != NULL); 
    memcpy(Bf, StrPool.Bf, BfL);
}
TStrPool64::TStrPool64 ( TSIn SIn,
bool  LoadCompact = true 
)

Definition at line 1729 of file dt.cpp.

References Bf, TSIn::GetCh(), GrowBy, IAssert, TSIn::Load(), and TSIn::LoadCs().

                                                 : 
  MxBfL(0), BfL(0), GrowBy(0), Bf(0) {
    uint64 _GrowBy, _MxBfL, _BfL;
    SIn.Load(_GrowBy); SIn.Load(_MxBfL); SIn.Load(_BfL);
    GrowBy = (::TSize)_GrowBy; MxBfL = (::TSize)_MxBfL; BfL = (::TSize)_BfL;
    if (LoadCompact) { MxBfL = BfL; }
    if (MxBfL > 0) { Bf = (char*)malloc(MxBfL); IAssert(Bf != NULL); }
    for (::TSize BfN = 0; BfN < _BfL; BfN++) { Bf[BfN] = SIn.GetCh(); }
    SIn.LoadCs();
}

Here is the call graph for this function:

~TMem ( )

Definition at line 89 of file dt.h.

References Bf.

{if (Bf!=NULL){delete[] Bf;}}
~TStrPool ( )

Definition at line 774 of file dt.h.

References Bf, TStr::Fmt(), and IAssertR.

{ if (Bf) free(Bf); else IAssertR(MxBfL == 0, TStr::Fmt("size: %u, expected size: 0", MxBfL).CStr());  Bf = 0; MxBfL = 0; BfL = 0; }

Here is the call graph for this function:

~TStrPool64 ( )

Definition at line 824 of file dt.h.

References Clr().

{ Clr(true); }

Here is the call graph for this function:


Variable Documentation