5 while (newSize < _MxBfL) {
7 else if (newSize > 0) newSize *= 2;
10 if (newSize >
MxBfL) {
11 Bf = (
char *) realloc(
Bf, newSize);
34 int NStr=0; SIn.
Load(NStr);
36 for (
int i = 0; i < NStr; i++) {
64 IAssertR(Len > 0,
"String too short (lenght includes the null character)");
66 if (Len == 1 &&
IdOffV.
Len() > 0) {
return 0; }
68 memcpy(
Bf +
BfL, Str, Len);
#define IAssertR(Cond, Reason)
TBigStrPool(TSize MxBfLen=0, uint _GrowBy=16 *1024 *1024)
TSizeTy Len() const
Returns the number of elements in the vector.
int AddStr(const char *Str, uint Len)
void Save(TSOut &SOut) const
static int GetPrimHashCd(const char *p)
static int GetSecHashCd(const char *p)
static int GetMn(const int &Int1, const int &Int2)
unsigned long long uint64
TBigStrPool & operator=(const TBigStrPool &Pool)
void SaveBf(const void *Bf, const TSize &BfL)
static int GetSecHashCd(const char *CStr)
void Save(const bool &Bool)
static TStr Fmt(const char *FmtStr,...)
void LoadBf(const void *Bf, const TSize &BfL)
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
static int GetPrimHashCd(const char *CStr)
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
int GetPrimHashCd() const
static int GetSecHashCd(const char *p)
void Resize(TSize _MxBfL)
static int GetPrimHashCd(const char *p)