SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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
THashKeyDat< TKey, TDat > Class Template Reference

#include <hash.h>

Collaboration diagram for THashKeyDat< TKey, TDat >:

Public Member Functions

 THashKeyDat ()
 
 THashKeyDat (const int &_Next, const int &_HashCd, const TKey &_Key)
 
 THashKeyDat (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
void LoadXml (const PXmlTok &XmlTok, const TStr &Nm="")
 
void SaveXml (TSOut &SOut, const TStr &Nm) const
 
template<typename TDatFunctor >
void LoadShM (TShMIn &ShMIn, TDatFunctor LoadDatFromShared)
 
bool operator== (const THashKeyDat &HashKeyDat) const
 
THashKeyDatoperator= (const THashKeyDat &HashKeyDat)
 

Public Attributes

TInt Next
 
TInt HashCd
 
TKey Key
 
TDat Dat
 

Detailed Description

template<class TKey, class TDat>
class THashKeyDat< TKey, TDat >

Definition at line 8 of file hash.h.

Constructor & Destructor Documentation

template<class TKey, class TDat>
THashKeyDat< TKey, TDat >::THashKeyDat ( )
inline

Definition at line 15 of file hash.h.

15  :
16  Next(-1), HashCd(-1), Key(), Dat(){}
TDat Dat
Definition: hash.h:13
TInt Next
Definition: hash.h:10
TKey Key
Definition: hash.h:12
TInt HashCd
Definition: hash.h:11
template<class TKey, class TDat>
THashKeyDat< TKey, TDat >::THashKeyDat ( const int &  _Next,
const int &  _HashCd,
const TKey &  _Key 
)
inline

Definition at line 17 of file hash.h.

17  :
18  Next(_Next), HashCd(_HashCd), Key(_Key), Dat(){}
TDat Dat
Definition: hash.h:13
TInt Next
Definition: hash.h:10
TKey Key
Definition: hash.h:12
TInt HashCd
Definition: hash.h:11
template<class TKey, class TDat>
THashKeyDat< TKey, TDat >::THashKeyDat ( TSIn SIn)
inlineexplicit

Definition at line 19 of file hash.h.

19  :
20  Next(SIn), HashCd(SIn), Key(SIn), Dat(SIn){}
TDat Dat
Definition: hash.h:13
TInt Next
Definition: hash.h:10
TKey Key
Definition: hash.h:12
TInt HashCd
Definition: hash.h:11

Member Function Documentation

template<class TKey, class TDat>
template<typename TDatFunctor >
void THashKeyDat< TKey, TDat >::LoadShM ( TShMIn ShMIn,
TDatFunctor  LoadDatFromShared 
)
inline

Definition at line 27 of file hash.h.

References THashKeyDat< TKey, TDat >::Dat, THashKeyDat< TKey, TDat >::HashCd, THashKeyDat< TKey, TDat >::Key, and THashKeyDat< TKey, TDat >::Next.

Referenced by THash< TKey, TDat, THashFunc >::TLoadTHKeyDatInitializer< TDatInitFn >::operator()().

27  {
28  Next = TInt(ShMIn);
29  HashCd = TInt(ShMIn);
30  TKey K(ShMIn);
31  Key = K;
32  LoadDatFromShared(&Dat, ShMIn);
33  }
TDat Dat
Definition: hash.h:13
TInt Next
Definition: hash.h:10
Definition: dt.h:1134
TKey Key
Definition: hash.h:12
TInt HashCd
Definition: hash.h:11

Here is the caller graph for this function:

template<class TKey , class TDat >
void THashKeyDat< TKey, TDat >::LoadXml ( const PXmlTok XmlTok,
const TStr Nm = "" 
)

Definition at line 119 of file xmlser.h.

References XLoad, and XLoadHd.

119  {
120  XLoadHd(Nm); XLoad(Key); XLoad(Dat);}
TDat Dat
Definition: hash.h:13
#define XLoadHd(Nm)
Definition: bd.h:312
#define XLoad(Nm)
Definition: bd.h:315
TKey Key
Definition: hash.h:12
template<class TKey, class TDat>
THashKeyDat& THashKeyDat< TKey, TDat >::operator= ( const THashKeyDat< TKey, TDat > &  HashKeyDat)
inline

Definition at line 38 of file hash.h.

References THashKeyDat< TKey, TDat >::Dat, THashKeyDat< TKey, TDat >::HashCd, THashKeyDat< TKey, TDat >::Key, and THashKeyDat< TKey, TDat >::Next.

38  {
39  if (this!=&HashKeyDat){
40  Next=HashKeyDat.Next; HashCd=HashKeyDat.HashCd;
41  Key=HashKeyDat.Key; Dat=HashKeyDat.Dat;}
42  return *this;}
TDat Dat
Definition: hash.h:13
TInt Next
Definition: hash.h:10
TKey Key
Definition: hash.h:12
TInt HashCd
Definition: hash.h:11
template<class TKey, class TDat>
bool THashKeyDat< TKey, TDat >::operator== ( const THashKeyDat< TKey, TDat > &  HashKeyDat) const
inline

Definition at line 34 of file hash.h.

References THashKeyDat< TKey, TDat >::Dat, THashKeyDat< TKey, TDat >::HashCd, and THashKeyDat< TKey, TDat >::Key.

34  {
35  if (this==&HashKeyDat || (HashCd==HashKeyDat.HashCd
36  && Key==HashKeyDat.Key && Dat==HashKeyDat.Dat)){return true;}
37  return false;}
TDat Dat
Definition: hash.h:13
TKey Key
Definition: hash.h:12
TInt HashCd
Definition: hash.h:11
template<class TKey, class TDat>
void THashKeyDat< TKey, TDat >::Save ( TSOut SOut) const
inline

Definition at line 21 of file hash.h.

References THashKeyDat< TKey, TDat >::Dat, THashKeyDat< TKey, TDat >::HashCd, THashKeyDat< TKey, TDat >::Key, THashKeyDat< TKey, TDat >::Next, and TInt::Save().

21  {
22  Next.Save(SOut); HashCd.Save(SOut); Key.Save(SOut); Dat.Save(SOut);}
TDat Dat
Definition: hash.h:13
void Save(TSOut &SOut) const
Definition: dt.h:1150
TInt Next
Definition: hash.h:10
TKey Key
Definition: hash.h:12
TInt HashCd
Definition: hash.h:11

Here is the call graph for this function:

template<class TKey , class TDat >
void THashKeyDat< TKey, TDat >::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 123 of file xmlser.h.

References XSave, and XSaveHd.

123  {
124  XSaveHd(Nm); XSave(Key); XSave(Dat);}
TDat Dat
Definition: hash.h:13
#define XSaveHd(Nm)
Definition: bd.h:318
#define XSave(Nm)
Definition: bd.h:333
TKey Key
Definition: hash.h:12

Member Data Documentation


The documentation for this class was generated from the following files: