|
SNAP Library 2.2, Developer Reference
2014-03-11 19:15:55
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <fds.h>

Public Types | |
| typedef TPt< TFHashKey< TKey, TFDat, TVDat > > | PFHashKey |
| typedef TFHash< TKey, TFDat, TVDat > | THash |
Public Member Functions | |
| TFHashKey () | |
| TFHashKey (const TBlobPt &_Next, const TKey &_Key, const TFDat &_FDat, const TBlobPt &_VDatBPt=TBlobPt()) | |
| ~TFHashKey () | |
| TFHashKey (TSIn &SIn) | |
| void | Save (TSOut &SOut) |
| TFHashKey & | operator= (const TFHashKey &FHashKey) |
| int | GetMemUsed () const |
| void | PutModified (const bool &_Modified) |
| void | OnDelFromCache (const TBlobPt &BlobPt, void *RefToBs) |
Static Public Member Functions | |
| static PFHashKey | Load (TSIn &SIn) |
Public Attributes | |
| TBlobPt | Next |
| TKey | Key |
| TFDat | FDat |
| TBlobPt | VDatBPt |
Private Attributes | |
| TCRef | CRef |
| bool | Modified |
Friends | |
| class | TPt< TFHashKey< TKey, TFDat, TVDat > > |
| int TFHashKey< TKey, TFDat, TVDat >::GetMemUsed | ( | ) | const [inline] |
Definition at line 40 of file fds.h.
References TFHashKey< TKey, TFDat, TVDat >::FDat, TBlobPt::GetMemUsed(), TFHashKey< TKey, TFDat, TVDat >::Key, TFHashKey< TKey, TFDat, TVDat >::Next, and TFHashKey< TKey, TFDat, TVDat >::VDatBPt.
{
return sizeof(THash*)+Next.GetMemUsed()+
Key.GetMemUsed()+FDat.GetMemUsed()+VDatBPt.GetMemUsed();}

| static PFHashKey TFHashKey< TKey, TFDat, TVDat >::Load | ( | TSIn & | SIn | ) | [inline, static] |
Definition at line 31 of file fds.h.
References TFHashKey< TKey, TFDat, TVDat >::TFHashKey().
{return new TFHashKey(SIn);}

| void TFHashKey< TKey, TFDat, TVDat >::OnDelFromCache | ( | const TBlobPt & | BlobPt, |
| void * | RefToBs | ||
| ) |
Definition at line 52 of file fds.h.
References fhbtKey, TFHash< TKey, TFDat, TVDat >::GetHashBBs(), TMOut::GetSIn(), IAssert, TBlobBs::PutBlob(), TPt< TRec >::Save(), and TInt::Save().
{
if (Modified){
// prepare hash table object
THash* FHash=(THash*)RefToBs;
// save the key
TMOut MOut; TInt(int(fhbtKey)).Save(MOut); Save(MOut);
TBlobPt NewBlobPt=FHash->GetHashBBs()->PutBlob(BlobPt, MOut.GetSIn());
// blob-pointer for key should not change
IAssert(NewBlobPt==BlobPt);
}
}

| TFHashKey& TFHashKey< TKey, TFDat, TVDat >::operator= | ( | const TFHashKey< TKey, TFDat, TVDat > & | FHashKey | ) | [inline] |
Definition at line 35 of file fds.h.
References TFHashKey< TKey, TFDat, TVDat >::FDat, TFHashKey< TKey, TFDat, TVDat >::Key, TFHashKey< TKey, TFDat, TVDat >::Modified, TFHashKey< TKey, TFDat, TVDat >::Next, and TFHashKey< TKey, TFDat, TVDat >::VDatBPt.
| void TFHashKey< TKey, TFDat, TVDat >::PutModified | ( | const bool & | _Modified | ) | [inline] |
Definition at line 44 of file fds.h.
References TFHashKey< TKey, TFDat, TVDat >::Modified.
{Modified=_Modified;}
| void TFHashKey< TKey, TFDat, TVDat >::Save | ( | TSOut & | SOut | ) | [inline] |
Definition at line 32 of file fds.h.
References TFHashKey< TKey, TFDat, TVDat >::FDat, TFHashKey< TKey, TFDat, TVDat >::Key, TFHashKey< TKey, TFDat, TVDat >::Next, TBlobPt::Save(), and TFHashKey< TKey, TFDat, TVDat >::VDatBPt.

Definition at line 20 of file fds.h.
Referenced by TFHashKey< TKey, TFDat, TVDat >::GetMemUsed(), TFHashKey< TKey, TFDat, TVDat >::operator=(), and TFHashKey< TKey, TFDat, TVDat >::Save().
Definition at line 19 of file fds.h.
Referenced by TFHashKey< TKey, TFDat, TVDat >::GetMemUsed(), TFHashKey< TKey, TFDat, TVDat >::operator=(), and TFHashKey< TKey, TFDat, TVDat >::Save().
bool TFHashKey< TKey, TFDat, TVDat >::Modified [private] |
Definition at line 14 of file fds.h.
Referenced by TFHashKey< TKey, TFDat, TVDat >::operator=(), and TFHashKey< TKey, TFDat, TVDat >::PutModified().
Definition at line 18 of file fds.h.
Referenced by TFHashKey< TKey, TFDat, TVDat >::GetMemUsed(), TFHashKey< TKey, TFDat, TVDat >::operator=(), and TFHashKey< TKey, TFDat, TVDat >::Save().
Definition at line 21 of file fds.h.
Referenced by TFHashKey< TKey, TFDat, TVDat >::GetMemUsed(), TFHashKey< TKey, TFDat, TVDat >::operator=(), and TFHashKey< TKey, TFDat, TVDat >::Save().