SNAP Library, User 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
xdt.h
Go to the documentation of this file.
00001 
00002 // String-Cache
00003 class TStrCache{
00004 private:
00005   TStrH StrH;
00006   int Hits, Rqs;
00007 public:
00008   TStrCache(const int& ExpectedStrs=0):
00009     StrH(ExpectedStrs), Hits(0), Rqs(0){}
00010   TStrCache(const TStrCache& StrCache):
00011     StrH(StrCache.StrH), Hits(StrCache.Hits), Rqs(StrCache.Rqs){}
00012   TStrCache(TSIn& SIn): StrH(SIn), Hits(0), Rqs(0){}
00013   void Save(TSOut& SOut){StrH.Save(SOut);}
00014 
00015   TStrCache& operator=(const TStrCache& StrCache){
00016     if (this!=&StrCache){StrH=StrCache.StrH; Hits=0; Rqs=0;} return *this;}
00017 
00018   void Clr(){StrH.Clr();}
00019   TStr GetStr(const TStr& Str);
00020 };
00021