TrinityCore
Loading...
Searching...
No Matches
DBCStorage< T > Class Template Reference

#include <DBCStore.h>

+ Inheritance diagram for DBCStorage< T >:

Public Types

typedef DBCStorageIterator< T > iterator
 

Public Member Functions

 DBCStorage (char const *fmt)
 
 ~DBCStorage ()
 
T const * LookupEntry (uint32 id) const
 
T const * AssertEntry (uint32 id) const
 
uint32 GetNumRows () const
 
bool Load (char const *path) override
 
bool LoadStringsFrom (char const *path) override
 
void LoadFromDB (char const *table, char const *format, char const *index) override
 
iterator begin ()
 
iterator end ()
 
- Public Member Functions inherited from DBCStorageBase
 DBCStorageBase (char const *fmt)
 
virtual ~DBCStorageBase ()
 
char const * GetFormat () const
 
uint32 GetFieldCount () const
 

Private Member Functions

 DBCStorage (DBCStorage const &right)=delete
 
DBCStorageoperator= (DBCStorage const &right)=delete
 

Private Attributes

union { 
 
   T **   AsT 
 
   char **   AsChar 
 
_indexTable 
 

Friends

class UnitTestDataLoader
 

Additional Inherited Members

- Protected Member Functions inherited from DBCStorageBase
bool Load (char const *path, char **&indexTable)
 
bool LoadStringsFrom (char const *path, char **indexTable)
 
void LoadFromDB (char const *table, char const *format, char const *index, char **&indexTable)
 
- Protected Attributes inherited from DBCStorageBase
uint32 _fieldCount
 
char const * _fileFormat
 
char * _dataTable
 
std::vector< char * > _stringPool
 
uint32 _indexTableSize
 

Detailed Description

template<class T>
class DBCStorage< T >

Definition at line 53 of file DBCStore.h.

Member Typedef Documentation

◆ iterator

template<class T >
typedef DBCStorageIterator<T> DBCStorage< T >::iterator

Definition at line 56 of file DBCStore.h.

Constructor & Destructor Documentation

◆ DBCStorage() [1/2]

template<class T >
DBCStorage< T >::DBCStorage ( char const *  fmt)
inlineexplicit

Definition at line 58 of file DBCStore.h.

◆ ~DBCStorage()

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

Definition at line 63 of file DBCStore.h.

◆ DBCStorage() [2/2]

template<class T >
DBCStorage< T >::DBCStorage ( DBCStorage< T > const &  right)
privatedelete

Member Function Documentation

◆ AssertEntry()

template<class T >
T const * DBCStorage< T >::AssertEntry ( uint32  id) const
inline

Definition at line 69 of file DBCStore.h.

+ Here is the call graph for this function:

◆ begin()

template<class T >
iterator DBCStorage< T >::begin ( )
inline

Definition at line 88 of file DBCStore.h.

◆ end()

template<class T >
iterator DBCStorage< T >::end ( )
inline

Definition at line 89 of file DBCStore.h.

◆ GetNumRows()

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

Definition at line 71 of file DBCStore.h.

◆ Load()

template<class T >
bool DBCStorage< T >::Load ( char const *  path)
inlineoverridevirtual

Implements DBCStorageBase.

Definition at line 73 of file DBCStore.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadFromDB()

template<class T >
void DBCStorage< T >::LoadFromDB ( char const *  table,
char const *  format,
char const *  index 
)
inlineoverridevirtual

Implements DBCStorageBase.

Definition at line 83 of file DBCStore.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadStringsFrom()

template<class T >
bool DBCStorage< T >::LoadStringsFrom ( char const *  path)
inlineoverridevirtual

Implements DBCStorageBase.

Definition at line 78 of file DBCStore.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LookupEntry()

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

Definition at line 68 of file DBCStore.h.

+ Here is the caller graph for this function:

◆ operator=()

template<class T >
DBCStorage & DBCStorage< T >::operator= ( DBCStorage< T > const &  right)
privatedelete

Friends And Related Symbol Documentation

◆ UnitTestDataLoader

template<class T >
friend class UnitTestDataLoader
friend

Definition at line 102 of file DBCStore.h.

Member Data Documentation

◆ [union]

union { ... } DBCStorage< T >::_indexTable

◆ AsChar

template<class T >
char** DBCStorage< T >::AsChar

Definition at line 95 of file DBCStore.h.

◆ AsT

template<class T >
T** DBCStorage< T >::AsT

Definition at line 94 of file DBCStore.h.


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