SNAP Library 2.3, Developer Reference  2014-06-16 11:58:46
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
xdt.h
Go to the documentation of this file.
1 // String-Cache
3 class TStrCache{
4 private:
6  int Hits, Rqs;
7 public:
8  TStrCache(const int& ExpectedStrs=0):
9  StrH(ExpectedStrs), Hits(0), Rqs(0){}
10  TStrCache(const TStrCache& StrCache):
11  StrH(StrCache.StrH), Hits(StrCache.Hits), Rqs(StrCache.Rqs){}
12  TStrCache(TSIn& SIn): StrH(SIn), Hits(0), Rqs(0){}
13  void Save(TSOut& SOut){StrH.Save(SOut);}
14 
15  TStrCache& operator=(const TStrCache& StrCache){
16  if (this!=&StrCache){StrH=StrCache.StrH; Hits=0; Rqs=0;} return *this;}
17 
18  void Clr(){StrH.Clr();}
19  TStr GetStr(const TStr& Str);
20 };
21 
TStrCache & operator=(const TStrCache &StrCache)
Definition: xdt.h:15
TStr GetStr(const TStr &Str)
Definition: xdt.cpp:3
void Save(TSOut &SOut) const
Definition: hash.h:141
TStrCache(const TStrCache &StrCache)
Definition: xdt.h:10
int Hits
Definition: xdt.h:6
Definition: fl.h:58
TStrH StrH
Definition: xdt.h:5
void Save(TSOut &SOut)
Definition: xdt.h:13
Definition: fl.h:128
void Clr()
Definition: xdt.h:18
int Rqs
Definition: xdt.h:6
Definition: dt.h:412
TStrCache(const int &ExpectedStrs=0)
Definition: xdt.h:8
void Clr(const bool &DoDel=true, const int &NoDelLim=-1, const bool &ResetDat=true)
Definition: hash.h:315
TStrCache(TSIn &SIn)
Definition: xdt.h:12
Definition: xdt.h:3