|
SNAP Library 4.1, Developer Reference
2018-07-26 16:30:42
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <hash.h>

Public Member Functions | |
| TBigStrPool (TSize MxBfLen=0, uint _GrowBy=16 *1024 *1024) | |
| TBigStrPool (TSIn &SIn, bool LoadCompact=true) | |
| TBigStrPool (const TBigStrPool &Pool) | |
| ~TBigStrPool () | |
| void | Save (TSOut &SOut) const |
| void | Save (const TStr &fileName) |
| int | GetStrs () const |
| TSize | Len () const |
| TSize | Size () const |
| bool | Empty () const |
| char * | operator() () const |
| TBigStrPool & | operator= (const TBigStrPool &Pool) |
| ::TSize | GetMemUsed () |
| int | AddStr (const char *Str, uint Len) |
| int | AddStr (const char *Str) |
| int | AddStr (const TStr &Str) |
| TStr | GetStr (const int &StrId) const |
| const char * | GetCStr (const int &StrId) const |
| TStr | GetStrFromOffset (const TSize &Offset) const |
| const char * | GetCStrFromOffset (const TSize &Offset) const |
| void | Clr (bool DoDel=false) |
| int | Cmp (const int &StrId, const char *Str) const |
| int | GetPrimHashCd (const int &StrId) |
| int | GetSecHashCd (const int &StrId) |
Static Public Member Functions | |
| static PBigStrPool | New (TSize _MxBfLen=0, uint _GrowBy=16 *1024 *1024) |
| static PBigStrPool | New (TSIn &SIn) |
| static PBigStrPool | New (const TStr &fileName) |
| static PBigStrPool | Load (TSIn &SIn, bool LoadCompacted=true) |
| static PBigStrPool | LoadShM (TShMIn &ShMIn, bool LoadCompact=true) |
| Load the string pool with the buffer backed by shared memory. More... | |
| static int | GetPrimHashCd (const char *CStr) |
| static int | GetSecHashCd (const char *CStr) |
Private Member Functions | |
| void | Resize (TSize _MxBfL) |
| void | LoadPoolShM (TShMIn &ShMIn, bool LoadCompact=true) |
Private Attributes | |
| TCRef | CRef |
| TSize | MxBfL |
| TSize | BfL |
| uint | GrowBy |
| char * | Bf |
| TVec< TSize > | IdOffV |
| bool | IsShM |
Friends | |
| class | TPt< TBigStrPool > |
| TBigStrPool::TBigStrPool | ( | TSIn & | SIn, |
| bool | LoadCompact = true |
||
| ) |
Definition at line 29 of file hash.cpp.
References TVec< TVal, TSizeTy >::Add(), Bf, BfL, TVec< TVal, TSizeTy >::Gen(), GrowBy, IAssert, IdOffV, TSIn::Load(), TSIn::LoadBf(), TSIn::LoadCs(), MxBfL, and TSizeMx.

|
inline |
| int TBigStrPool::AddStr | ( | const char * | Str, |
| uint | Len | ||
| ) |
Definition at line 95 of file hash.cpp.
References TVec< TVal, TSizeTy >::Add(), Assert, Bf, BfL, IAssertR, IdOffV, TVec< TVal, TSizeTy >::Len(), Len(), MxBfL, and Resize().
Referenced by TBigStrPool().


|
inline |
|
inline |
Definition at line 753 of file hash.h.
References AddStr(), TStr::CStr(), and TStr::Len().
Referenced by AddStr().


|
inline |
|
inline |
Definition at line 757 of file hash.h.
References Assert, TStr::CStr(), and TStr::GetNullStr().

|
inline |
Definition at line 762 of file hash.h.
References Assert, TStr::CStr(), and TStr::GetNullStr().

|
inline |
|
static |
Definition at line 106 of file hash.cpp.
References TStrHashF_DJB::GetPrimHashCd().

|
inline |
Definition at line 772 of file hash.h.
References Assert, and TPt< TRec >::GetPrimHashCd().

|
static |
Definition at line 110 of file hash.cpp.
References TStrHashF_DJB::GetSecHashCd().

|
inline |
Definition at line 774 of file hash.h.
References Assert, and TPt< TRec >::GetSecHashCd().

|
inline |
Definition at line 755 of file hash.h.
References Assert, and TStr::GetNullStr().

Definition at line 760 of file hash.h.
References Assert, and TStr::GetNullStr().

|
inline |
|
inlinestatic |
Definition at line 731 of file hash.h.
|
private |
Definition at line 48 of file hash.cpp.
References TVec< TVal, TSizeTy >::Add(), TShMIn::AdvanceCursor(), Bf, BfL, TVec< TVal, TSizeTy >::Gen(), GrowBy, IAssert, IdOffV, IsShM, TSIn::Load(), TSIn::LoadBf(), TShMIn::LoadCs(), MxBfL, and TSizeMx.
Referenced by LoadShM().


|
inlinestatic |
Load the string pool with the buffer backed by shared memory.
Definition at line 733 of file hash.h.
References LoadPoolShM().

|
inlinestatic |
Definition at line 728 of file hash.h.
|
inlinestatic |
Definition at line 729 of file hash.h.
|
inlinestatic |
Definition at line 730 of file hash.h.
References TFIn::New().

| TBigStrPool & TBigStrPool::operator= | ( | const TBigStrPool & | Pool | ) |
|
private |
| void TBigStrPool::Save | ( | TSOut & | SOut | ) | const |
Definition at line 75 of file hash.cpp.
References Bf, BfL, GrowBy, IdOffV, TVec< TVal, TSizeTy >::Len(), MxBfL, TSOut::Save(), TSOut::SaveBf(), and TSOut::SaveCs().

|
inline |
|
friend |
|
private |
Definition at line 715 of file hash.h.
Referenced by AddStr(), LoadPoolShM(), operator=(), Resize(), Save(), and TBigStrPool().
|
private |
Definition at line 713 of file hash.h.
Referenced by AddStr(), LoadPoolShM(), operator=(), Save(), and TBigStrPool().
|
private |
Definition at line 714 of file hash.h.
Referenced by LoadPoolShM(), operator=(), Resize(), Save(), and TBigStrPool().
Definition at line 716 of file hash.h.
Referenced by AddStr(), LoadPoolShM(), Save(), and TBigStrPool().
|
private |
Definition at line 717 of file hash.h.
Referenced by LoadPoolShM(), and Resize().
|
private |
Definition at line 713 of file hash.h.
Referenced by AddStr(), LoadPoolShM(), operator=(), Resize(), Save(), and TBigStrPool().