Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
DB2Storage< T > Class Template Reference

#include <DB2Store.h>

Inheritance diagram for DB2Storage< T >:
Collaboration diagram for DB2Storage< T >:

Public Member Functions

void Clear ()
T * CreateEntry (uint32 id, bool evenIfExists=false)
 DB2Storage (char const *f, EntryChecker checkEntry=NULL, PacketWriter writePacket=NULL)
void EraseEntry (uint32 id)
uint32 GetFieldCount () const
char const * GetFormat () const
uint32 GetNumRows () const
bool HasRecord (uint32 id) const
bool Load (char const *fn, uint32 locale)
bool LoadStringsFrom (char const *fn, uint32 locale)
T const * LookupEntry (uint32 id) const
void WriteRecord (uint32 id, uint32 locale, ByteBuffer &buffer) const
 ~DB2Storage ()
Public Member Functions inherited from DB2StorageBase
uint32 GetHash () const
virtual ~DB2StorageBase ()

Public Attributes

EntryChecker CheckEntry
PacketWriter WritePacket

Private Types

typedef std::vector< T * > DataTableEx
typedef bool(* EntryChecker) (DB2Storage< T > const &, uint32)
typedef void(* PacketWriter) (DB2Storage< T > const &, uint32, uint32, ByteBuffer &)
typedef std::list< char * > StringPoolList

Private Attributes

uint32 fieldCount
char const * fmt
union { 
   char **   asChar 
   T **   asT 
indexTable
T * m_dataTable
DataTableEx m_dataTableEx
StringPoolList m_stringPoolList
uint32 nCount

Additional Inherited Members

Protected Attributes inherited from DB2StorageBase
uint32 tableHash

Detailed Description

template<class T>
class DB2Storage< T >

Definition at line 89 of file DB2Store.h.

Member Typedef Documentation

◆ DataTableEx

template<class T>
typedef std::vector<T*> DB2Storage< T >::DataTableEx
private

Definition at line 92 of file DB2Store.h.

◆ EntryChecker

template<class T>
typedef bool(* DB2Storage< T >::EntryChecker) (DB2Storage< T > const &, uint32)
private

Definition at line 93 of file DB2Store.h.

◆ PacketWriter

template<class T>
typedef void(* DB2Storage< T >::PacketWriter) (DB2Storage< T > const &, uint32, uint32, ByteBuffer &)
private

Definition at line 94 of file DB2Store.h.

◆ StringPoolList

template<class T>
typedef std::list<char*> DB2Storage< T >::StringPoolList
private

Definition at line 91 of file DB2Store.h.

Constructor & Destructor Documentation

◆ DB2Storage()

template<class T>
DB2Storage< T >::DB2Storage ( char const * f,
EntryChecker checkEntry = NULL,
PacketWriter writePacket = NULL )
inline

◆ ~DB2Storage()

template<class T>
DB2Storage< T >::~DB2Storage ( )
inline

Definition at line 104 of file DB2Store.h.

References Clear().

Member Function Documentation

◆ Clear()

template<class T>
void DB2Storage< T >::Clear ( )
inline

Definition at line 180 of file DB2Store.h.

References indexTable, m_dataTable, m_dataTableEx, m_stringPoolList, and nCount.

Referenced by ~DB2Storage().

◆ CreateEntry()

template<class T>
T * DB2Storage< T >::CreateEntry ( uint32 id,
bool evenIfExists = false )
inline

Definition at line 116 of file DB2Store.h.

References indexTable, LookupEntry(), m_dataTableEx, and nCount.

◆ EraseEntry()

template<class T>
void DB2Storage< T >::EraseEntry ( uint32 id)
inline

Definition at line 138 of file DB2Store.h.

References indexTable.

◆ GetFieldCount()

template<class T>
uint32 DB2Storage< T >::GetFieldCount ( ) const
inline

Definition at line 110 of file DB2Store.h.

References fieldCount.

Referenced by LoadDB2().

◆ GetFormat()

template<class T>
char const * DB2Storage< T >::GetFormat ( ) const
inline

Definition at line 109 of file DB2Store.h.

References fmt.

Referenced by LoadDB2(), and WriteDB2RecordToPacket().

◆ GetNumRows()

template<class T>
uint32 DB2Storage< T >::GetNumRows ( ) const
inline

Definition at line 108 of file DB2Store.h.

References nCount.

◆ HasRecord()

template<class T>
bool DB2Storage< T >::HasRecord ( uint32 id) const
inlinevirtual

Implements DB2StorageBase.

Definition at line 106 of file DB2Store.h.

References CheckEntry.

◆ Load()

◆ LoadStringsFrom()

template<class T>
bool DB2Storage< T >::LoadStringsFrom ( char const * fn,
uint32 locale )
inline

◆ LookupEntry()

template<class T>
T const * DB2Storage< T >::LookupEntry ( uint32 id) const
inline

Definition at line 107 of file DB2Store.h.

References indexTable, and nCount.

Referenced by CreateEntry(), DB2StorageHasEntry(), and WriteDB2RecordToPacket().

◆ WriteRecord()

template<class T>
void DB2Storage< T >::WriteRecord ( uint32 id,
uint32 locale,
ByteBuffer & buffer ) const
inlinevirtual

Implements DB2StorageBase.

Definition at line 111 of file DB2Store.h.

References WritePacket.

Member Data Documentation

◆ asChar

template<class T>
char** DB2Storage< T >::asChar

Definition at line 214 of file DB2Store.h.

◆ asT

template<class T>
T** DB2Storage< T >::asT

Definition at line 213 of file DB2Store.h.

◆ CheckEntry

template<class T>
EntryChecker DB2Storage< T >::CheckEntry

Definition at line 204 of file DB2Store.h.

Referenced by DB2Storage(), and HasRecord().

◆ fieldCount

template<class T>
uint32 DB2Storage< T >::fieldCount
private

Definition at line 209 of file DB2Store.h.

Referenced by DB2Storage(), GetFieldCount(), and Load().

◆ fmt

template<class T>
char const* DB2Storage< T >::fmt
private

Definition at line 210 of file DB2Store.h.

Referenced by DB2Storage(), GetFormat(), Load(), and LoadStringsFrom().

◆ [union]

union { ... } DB2Storage< T >::indexTable

◆ m_dataTable

template<class T>
T* DB2Storage< T >::m_dataTable
private

Definition at line 216 of file DB2Store.h.

Referenced by Clear(), DB2Storage(), Load(), and LoadStringsFrom().

◆ m_dataTableEx

template<class T>
DataTableEx DB2Storage< T >::m_dataTableEx
private

Definition at line 217 of file DB2Store.h.

Referenced by Clear(), and CreateEntry().

◆ m_stringPoolList

template<class T>
StringPoolList DB2Storage< T >::m_stringPoolList
private

Definition at line 218 of file DB2Store.h.

Referenced by Clear(), Load(), and LoadStringsFrom().

◆ nCount

template<class T>
uint32 DB2Storage< T >::nCount
private

Definition at line 208 of file DB2Store.h.

Referenced by Clear(), CreateEntry(), DB2Storage(), GetNumRows(), Load(), and LookupEntry().

◆ WritePacket

template<class T>
PacketWriter DB2Storage< T >::WritePacket

Definition at line 205 of file DB2Store.h.

Referenced by DB2Storage(), and WriteRecord().


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