Cern
LibTmsApi 2.3.0

#include <BDict.h>

Inheritance diagram for BDict< Type >:
BList< BDictItem< Type > > BConfig

Public Types

typedef BIter iterator
 
- Public Types inherited from BList< BDictItem< Type > >
typedef int(* SortFunc) (BDictItem< Type > &a, BDictItem< Type > &b)
 Prototype for sorting function.
 

Public Member Functions

 BDict (int hashSize=100)
 
 BDict (const BDict< Type > &dict)
 
int hasKey (const BString &k) const
 
BString key (const BIter &i) const
 
void clear ()
 Clear the list.
 
void insert (BIter &i, const BDictItem< Type > &item)
 
void append (const BDictItem< Type > &item)
 
void append (const BDict< Type > &dict)
 
void del (const BString &k)
 
void del (BIter &i)
 Delete specified item.
 
BIter find (const BString &k) const
 
Type & operator[] (const BString &i)
 
Type & operator[] (const BIter &i)
 
const Type & operator[] (const BIter &i) const
 
BDict< Type > operator+ (const BDict< Type > &dict) const
 
BDict< Type > & operator= (const BDict< Type > &dict)
 
void hashPrint ()
 
- Public Member Functions inherited from BList< BDictItem< Type > >
 BList ()
 
 BList (const BList< BDictItem< Type > > &l)
 
virtual ~BList ()
 
void start (BIter &i) const
 Iterator to start of list.
 
BIter begin () const
 Iterator for start of list.
 
BIter end () const
 Iterator for end of list.
 
BIter end (BIter &i) const
 Iterator for end of list.
 
void next (BIter &i) const
 Iterator for next item in list.
 
void prev (BIter &i)
 Iterator for previous item in list.
 
BIter goTo (int pos) const
 Iterator for pos item in list.
 
int position (BIter i)
 Postition in list item with iterator i.
 
unsigned int number () const
 Number of items in list.
 
unsigned int size () const
 Number of items in list.
 
int isEnd (BIter &i) const
 True if iterator refers to last item.
 
BDictItem< Type > & front ()
 Get first item in list.
 
BDictItem< Type > & rear ()
 Get last item in list.
 
BDictItem< Type > & get (BIter i)
 Get item specified by iterator in list.
 
const BDictItem< Type > & get (BIter i) const
 Get item specified by iterator in list.
 
void append (const BDictItem< Type > &item)
 Append item to list.
 
void append (const BList< BDictItem< Type > > &l)
 Append list to list.
 
virtual void insert (BIter &i, const BDictItem< Type > &item)
 Insert item before item.
 
void insertAfter (BIter &i, const BDictItem< Type > &item)
 Insert item after item.
 
virtual void clear ()
 Clear the list.
 
virtual void del (BIter &i)
 Delete specified item.
 
void deleteLast ()
 Delete last item.
 
void deleteFirst ()
 Delete fisrt item.
 
void push (const BDictItem< Type > &i)
 Push item onto list.
 
BDictItem< Type > pop ()
 Pop item from list deleteing item.
 
void queueAdd (const BDictItem< Type > &i)
 Add item to end of list.
 
BDictItem< Type > queueGet ()
 Get item from front of list deleteing item.
 
int has (const BDictItem< Type > &i) const
 Checks if the item is in the list.
 
void swap (BIter i1, BIter i2)
 Swap two items in list.
 
void sort ()
 Sort list based on get(i) values.
 
void sort (SortFunc func)
 Sort list based on Sort func.
 
BList< BDictItem< Type > > & operator= (const BList< BDictItem< Type > > &l)
 
BDictItem< Type > & operator[] (int i)
 
const BDictItem< Type > & operator[] (int i) const
 
BDictItem< Type > & operator[] (BIter i)
 
const BDictItem< Type > & operator[] (const BIter &i) const
 
BList< BDictItem< Type > > operator+ (const BList< BDictItem< Type > > &l) const
 

Private Member Functions

void hashAdd (const BString &k, BIter iter)
 
void hashDelete (const BString &k, BIter iter)
 
int hashFind (const BString &k, BIter &iter) const
 

Private Attributes

int ohashSize
 
BArray< BList< BIter > > ohashLists
 

Additional Inherited Members

- Protected Member Functions inherited from BList< BDictItem< Type > >
virtual Node * nodeGet (BIter i)
 
virtual const Node * nodeGet (BIter i) const
 
virtual Node * nodeCreate (const BDictItem< Type > &item)
 
- Protected Attributes inherited from BList< BDictItem< Type > >
Node * onodes
 
unsigned int olength
 

Member Typedef Documentation

◆ iterator

template<class Type >
typedef BIter BDict< Type >::iterator

Constructor & Destructor Documentation

◆ BDict() [1/2]

template<class Type >
BDict< Type >::BDict ( int  hashSize = 100)

◆ BDict() [2/2]

template<class Type >
BDict< Type >::BDict ( const BDict< Type > &  dict)

Member Function Documentation

◆ append() [1/2]

template<class Type >
void BDict< Type >::append ( const BDict< Type > &  dict)

◆ append() [2/2]

template<class Type >
void BDict< Type >::append ( const BDictItem< Type > &  item)

◆ clear()

template<class Type >
void BDict< Type >::clear
virtual

Clear the list.

Reimplemented from BList< BDictItem< Type > >.

◆ del() [1/2]

template<class Type >
void BDict< Type >::del ( BIter i)
virtual

Delete specified item.

Reimplemented from BList< BDictItem< Type > >.

◆ del() [2/2]

template<class Type >
void BDict< Type >::del ( const BString k)

◆ find()

template<class Type >
BIter BDict< Type >::find ( const BString k) const

◆ hashAdd()

template<class Type >
void BDict< Type >::hashAdd ( const BString k,
BIter  iter 
)
private

◆ hashDelete()

template<class Type >
void BDict< Type >::hashDelete ( const BString k,
BIter  iter 
)
private

◆ hashFind()

template<class Type >
int BDict< Type >::hashFind ( const BString k,
BIter iter 
) const
private

◆ hashPrint()

template<class Type >
void BDict< Type >::hashPrint

◆ hasKey()

template<class Type >
int BDict< Type >::hasKey ( const BString k) const

◆ insert()

template<class Type >
void BDict< Type >::insert ( BIter i,
const BDictItem< Type > &  item 
)

◆ key()

template<class Type >
BString BDict< Type >::key ( const BIter i) const

◆ operator+()

template<class Type >
BDict< Type > BDict< Type >::operator+ ( const BDict< Type > &  dict) const

◆ operator=()

template<class Type >
BDict< Type > & BDict< Type >::operator= ( const BDict< Type > &  dict)

◆ operator[]() [1/3]

template<class Type >
Type & BDict< Type >::operator[] ( const BIter i)

◆ operator[]() [2/3]

template<class Type >
const Type & BDict< Type >::operator[] ( const BIter i) const

◆ operator[]() [3/3]

template<class Type >
Type & BDict< Type >::operator[] ( const BString i)

Member Data Documentation

◆ ohashLists

template<class Type >
BArray<BList<BIter> > BDict< Type >::ohashLists
private

◆ ohashSize

template<class Type >
int BDict< Type >::ohashSize
private

The documentation for this class was generated from the following file:
  • /src/cern/tms/tms/beam/libBeam/BDict.h