Logo Search packages:      
Sourcecode: verlihub version File versions

nDirectConnect::cUserCollection Class Reference

#include <cusercollection.h>

Inheritance diagram for nDirectConnect::cUserCollection:

nUtils::tHashArray< DataType > cObj

List of all members.


Detailed Description

a structure that allows to insert and remove users, to quickly iterate and hold common sendall buffer, provides also number of sendall functions

supports: quick iterating with (restrained) constant time increment (see std::slist) , logaritmic finding, adding, removing, testing for existence.... (see std::hash_map)

Author:
Daniel Muller

Definition at line 55 of file cusercollection.h.


Public Types

typedef tUniqueHashArray< sItem * > tData
typedef unsigned long tHashType

Public Member Functions

bool Add (cUserBase *User)
bool AddWithHash (DataType Data, const tHashType &Hash)
bool AddWithKey (cUserBase *User, const string &Key)
bool AddWithNick (cUserBase *User, const string &Nick)
void AutoResize ()
iterator begin ()
void Clear ()
bool ContainsHash (const tHashType &Hash)
bool ContainsKey (const string &Key)
bool ContainsNick (const string &Nick)
 cUserCollection (bool KeepNickList=false, bool KeepINFOList=false)
void DumpProfile (ostream &os)
iterator end ()
virtual std::ostream & ErrLog ()
int ErrLog (int level)
void FlushCache ()
void FlushForUser (cUserBase *User)
DataType GetByHash (const tHashType &Hash)
virtual string & GetInfoList (bool complete=false)
virtual string & GetNickList ()
const char * GetNickListChar ()
cUserBaseGetUserBaseByKey (const string &Key)
cUserBaseGetUserBaseByNick (const string &Nick)
tHashType Key2Hash (const string &Key)
virtual std::ostream & Log ()
int Log (int level)
std::ostream & LogStream ()
tHashType Nick2Hash (const std::string &Nick)
void Nick2Hash (const std::string &Nick, tHashType &Hash)
void Nick2Key (const std::string &Nick, std::string &Key)
virtual void OnAdd (DataType)
virtual void OnAdd (cUserBase *User)
virtual void OnRemove (DataType)
virtual void OnRemove (cUserBase *)
bool Remove (cUserBase *User)
bool RemoveByHash (const tHashType &Hash)
bool RemoveByKey (const string &Key)
bool RemoveByNick (const string &Nick)
int Resize (int NewSize)
void SendToAll (string &Data, bool UseCache=false, bool AddPipe=true)
void SendToAllWithNick (string &Start, string &End)
bool SetByHash (const tHashType &Hash, const DataType &value)
void SetClassName (const char *name)
void SetNickListSeparator (const string &Separator)
void SetNickListStart (const string &Start)
unsigned size ()
virtual int StrLog (std::ostream &ostr, int level)
virtual int StrLog (ostream &ostr, int level)

Static Public Member Functions

static int GetCount ()
static tHashType HashString (const string &)
static tHashType HashStringLower (const string &)

Public Attributes

const char * mClassName
std::ostream * mToLog

Static Public Attributes

static const string mEmpty
static int msLogLevel = 4

Protected Attributes

tDatamData
bool mIsResizing
bool mKeepInfoList
bool mKeepNickList
bool mRemakeNextInfoList
bool mRemakeNextNickList
unsigned mSize

Private Attributes

string mINFOList
string mINFOListComplete
ufDoINFOList mINFOListMaker
string mNickList
ufDoNickList mNickListMaker
string mSendAllCache

Classes

struct  ufDoINFOList
struct  ufDoNickList
struct  ufSend
struct  ufSendWithNick

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

Generated by  Doxygen 1.6.0   Back to index