SNAP Library 6.0, User Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
THashKeyDat< TKey, TDat > Class Template Reference

#include <hash.h>

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.

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:1137
TKey Key
Definition: hash.h:12
TInt HashCd
Definition: hash.h:11
template<class TKey , class TDat >
void THashKeyDat< TKey, TDat >::LoadXml ( const PXmlTok XmlTok,
const TStr Nm = "" 
)

Definition at line 119 of file xmlser.h.

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.

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.

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.

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:1153
TInt Next
Definition: hash.h:10
TKey Key
Definition: hash.h:12
TInt HashCd
Definition: hash.h:11
template<class TKey , class TDat >
void THashKeyDat< TKey, TDat >::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 123 of file xmlser.h.

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

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

Definition at line 13 of file hash.h.

template<class TKey, class TDat>
TInt THashKeyDat< TKey, TDat >::HashCd

Definition at line 11 of file hash.h.

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

Definition at line 12 of file hash.h.

template<class TKey, class TDat>
TInt THashKeyDat< TKey, TDat >::Next

Definition at line 10 of file hash.h.


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