SNAP Library 3.0, User Reference  2016-07-20 17:56:49
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
TTableContext Class Reference

Execution context. More...

#include <table.h>

Public Member Functions

 TTableContext ()
 Default constructor. More...
 
 TTableContext (TSIn &SIn)
 Loads TTableContext in binary from SIn. More...
 
void Load (TSIn &SIn)
 Loads TTableContext in binary from SIn. More...
 
void Save (TSOut &SOut)
 Saves TTableContext in binary to SOut. More...
 
TInt AddStr (const TStr &Key)
 Adds string Key to the context, returns its KeyId. More...
 
TStr GetStr (const TInt &KeyId) const
 Returns a string with KeyId. More...
 

Protected Attributes

TStrHash< TInt, TBigStrPoolStringVals
 StringPool - stores string data values and maps them to integers. More...
 

Friends

class TTable
 

Detailed Description

Execution context.

Definition at line 194 of file table.h.

Constructor & Destructor Documentation

TTableContext::TTableContext ( )
inline

Default constructor.

Definition at line 200 of file table.h.

200 {}
TTableContext::TTableContext ( TSIn SIn)
inline

Loads TTableContext in binary from SIn.

Definition at line 202 of file table.h.

202 : StringVals(SIn) {}
TStrHash< TInt, TBigStrPool > StringVals
StringPool - stores string data values and maps them to integers.
Definition: table.h:196

Member Function Documentation

TInt TTableContext::AddStr ( const TStr Key)
inline

Adds string Key to the context, returns its KeyId.

Definition at line 208 of file table.h.

208  {
209  TInt KeyId = TInt(StringVals.AddKey(Key));
210  return(KeyId);
211  }
TStrHash< TInt, TBigStrPool > StringVals
StringPool - stores string data values and maps them to integers.
Definition: table.h:196
int AddKey(const char *Key)
Definition: hash.h:896
Definition: dt.h:1044
TStr TTableContext::GetStr ( const TInt KeyId) const
inline

Returns a string with KeyId.

Definition at line 213 of file table.h.

213  {
214  return StringVals.GetKey(KeyId);
215  }
const char * GetKey(const int &KeyId) const
Definition: hash.h:821
TStrHash< TInt, TBigStrPool > StringVals
StringPool - stores string data values and maps them to integers.
Definition: table.h:196
void TTableContext::Load ( TSIn SIn)
inline

Loads TTableContext in binary from SIn.

Definition at line 204 of file table.h.

204 { StringVals.Load(SIn); }
TStrHash< TInt, TBigStrPool > StringVals
StringPool - stores string data values and maps them to integers.
Definition: table.h:196
void Load(TSIn &SIn, bool PoolToo=true)
Definition: hash.h:759
void TTableContext::Save ( TSOut SOut)
inline

Saves TTableContext in binary to SOut.

Definition at line 206 of file table.h.

206 { StringVals.Save(SOut); }
void Save(TSOut &SOut, bool PoolToo=true) const
Definition: hash.h:761
TStrHash< TInt, TBigStrPool > StringVals
StringPool - stores string data values and maps them to integers.
Definition: table.h:196

Friends And Related Function Documentation

friend class TTable
friend

Definition at line 197 of file table.h.

Member Data Documentation

TStrHash<TInt, TBigStrPool> TTableContext::StringVals
protected

StringPool - stores string data values and maps them to integers.

Definition at line 196 of file table.h.


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