Logo Search packages:      
Sourcecode: verlihub version File versions

nConfig::tMySQLMemoryList< DataType, OwnerType > Class Template Reference

#include <tmysqlmemorylist.h>

Inheritance diagram for nConfig::tMySQLMemoryList< DataType, OwnerType >:

nConfig::cConfMySQL nConfig::cConfigBase nConfig::cConfigBaseBase cObj nConfig::tMySQLMemoryHash< DataType, OwnerType > nConfig::tMySQLMemoryOrdList< DataType, OwnerType > nDirectConnect::nTables::cConnTypes nDirectConnect::nTables::cDCClients nDirectConnect::nTables::cTriggers nConfig::tMySQLMemoryHash< DATA_TYPE, PLUGIN_TYPE > nConfig::tMySQLMemoryOrdList< DATA_TYPE, PLUGIN_TYPE >

List of all members.

Detailed Description

template<class DataType, class OwnerType>
class nConfig::tMySQLMemoryList< DataType, OwnerType >

Daniel Muller

Definition at line 30 of file tmysqlmemorylist.h.

Public Types

typedef tMyDataType::iterator iterator
typedef tItemHash::iterator tIHIt
typedef tcHashListMap
< cConfigItemBase *, unsigned > 
typedef unsigned tItemHashType
typedef vector< size_t > tItemVec
typedef tItemVec::iterator tIVIt
typedef vector< DataType * > tMyDataType

Public Member Functions

cConfigItemBaseAdd (const string &, cConfigItemBase *)
template<class T>
void AddCol (const char *colName, const char *colType, const char *colDefault, bool colNull, T &var)
virtual DataType * AddData (DataType const &data)
 Add data into memory and database too, if you add twice same, it may be duplicated.
virtual void AddFields ()=0
 add all field you want in this function
void AddPrimaryKey (const char *)
void AllFields (ostream &, bool DoF=true, bool DoV=false, bool IsAff=false, string joint=string(", "))
void AllPKFields (ostream &, bool DoF=true, bool DoV=false, bool IsAff=false, string joint=string(", "))
virtual DataType * AppendData (DataType const &data)
iterator begin ()
void BindNick (int, const string &)
virtual bool CompareDataKey (const DataType &D1, const DataType &D2)
void CreateTable ()
db_iteratordb_begin ()
db_iteratordb_begin (cQuery &)
db_iteratordb_end ()
 DeclareAddMethods (double)
 DeclareAddMethods (char *)
 DeclareAddMethods (string)
 DeclareAddMethods (__int64)
 DeclareAddMethods (unsigned long)
 DeclareAddMethods (long)
 DeclareAddMethods (unsigned)
 DeclareAddMethods (int)
 DeclareAddMethods (char)
 DeclareAddMethods (bool)
virtual void DelData (DataType &data)
 Removes data from database, given probably by the PK.
void DeletePK ()
virtual void Empty ()
 empty what is in the memory storage
iterator end ()
int EndQuery (cQuery &)
int EndQuery ()
virtual std::ostream & ErrLog ()
int ErrLog (int level)
virtual DataType * FindData (DataType &ByKey)
bool InstallDefaultData ()
 load default data script from a file
virtual int Load (cQuery &)
virtual int Load ()
bool LoadPK ()
virtual std::ostream & Log ()
int Log (int level)
std::ostream & LogStream ()
virtual void OnLoadData (DataType &Data)
virtual void OnStart ()
cConfigItemBaseoperator[] (const string &)
DataType * operator[] (int i)
 Get the i-th element from the list.
virtual int ReloadAll ()
 Loads all data from the database into memory.
virtual int Save ()
void SaveData (size_t n)
 save data on n-th position
bool SavePK (bool dup=false)
void SelectFields (ostream &)
void SetBaseTo (void *new_base)
void SetClassName (const char *name)
void SetSelectOrder (const string &Order)
void SetSelectWhere (const string &Order)
virtual int Size ()
int StartQuery (cQuery &)
int StartQuery ()
int StartQuery (string query)
virtual int StrLog (std::ostream &ostr, int level)
 tMySQLMemoryList (cMySQL &mysql, OwnerType *owner, string tablename)
virtual int UpdateData (DataType &data)
void UpdateFields (ostream &os)
bool UpdatePK (cQuery &)
bool UpdatePK ()
bool UpdatePKVar (cConfigItemBase *)
bool UpdatePKVar (const char *)
bool UpdatePKVar (const char *var_name, string &new_val)
void WherePKey (ostream &os)

Static Public Member Functions

static int GetCount ()
static void WriteStringConstant (ostream &os, const string &str)

Public Attributes

void * mBasePtr
iterator mBegin
const char * mClassName
iterator mEnd
tItemHash mhItems
cBasicItemCreator * mItemCreator
cQuery mQuery
std::ostream * mToLog
tItemVec mvItems

Static Public Attributes

static const string mEmpty
static hHashStr< tItemHashType > msHasher
static int msLogLevel = 4

Protected Attributes

unsigned mCols
DataType mModel
cMySQLTable mMySQLTable
string mOrderString
OwnerType * mOwner
tItemHash mPrimaryKey
string mWhereString
int ok

Private Attributes

tMyDataType mData

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

Generated by  Doxygen 1.6.0   Back to index