BList< T > Class Template Reference

Template based list class. More...

#include <BList.h>

List of all members.

Classes

class  Node

Public Types

typedef int(* SortFunc )(T &a, T &b)
 Prototype for sorting function.

Public Member Functions

 BList ()
 BList (const BList< T > &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.
T & front ()
 Get first item in list.
T & rear ()
 Get last item in list.
T & get (BIter i)
 Get item specified by iterator in list.
const T & get (BIter i) const
 Get item specified by iterator in list.
void append (const T &item)
 Append item to list.
virtual void insert (BIter &i, const T &item)
 Insert item before item.
void insertAfter (BIter &i, const T &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 T &i)
 Push item onto list.
pop ()
 Pop item from list deleteing item.
void queueAdd (const T &i)
 Add item to end of list.
queueGet ()
 Get item from front of list deleteing item.
void append (const BList< T > &l)
 Append list to list.
int has (const T &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< T > & operator= (const BList< T > &l)
T & operator[] (int i)
const T & operator[] (int i) const
T & operator[] (BIter i)
const T & operator[] (const BIter &i) const
BList< T > operator+ (const BList< T > &l) const

Protected Member Functions

virtual NodenodeGet (BIter i)
virtual const NodenodeGet (BIter i) const
virtual NodenodeCreate (const T &item)

Protected Attributes

Nodeonodes
unsigned int olength

Private Member Functions

virtual NodenodeCreate ()

Detailed Description

template<class T>
class BList< T >

Template based list class.


Member Typedef Documentation

template<class T>
typedef int(* BList< T >::SortFunc)(T &a, T &b)

Prototype for sorting function.


Constructor & Destructor Documentation

template<class T >
BList< T >::BList (  )  [inline]
template<class T>
BList< T >::BList ( const BList< T > &  l  )  [inline]
template<class T >
BList< T >::~BList (  )  [inline, virtual]

Member Function Documentation

template<class T>
void BList< T >::append ( const BList< T > &  l  )  [inline]

Append list to list.

Reimplemented in BDict< Type >, and BDict< BString >.

template<class T>
void BList< T >::append ( const T &  item  )  [inline]

Append item to list.

Reimplemented in BDict< Type >, and BDict< BString >.

template<class T >
BIter BList< T >::begin (  )  const [inline]

Iterator for start of list.

template<class T >
void BList< T >::clear (  )  [inline, virtual]

Clear the list.

Reimplemented in BDict< Type >, BDir, BEntryList, BEntryFile, and BDict< BString >.

template<class T >
void BList< T >::del ( BIter i  )  [inline, virtual]

Delete specified item.

Reimplemented in BDict< Type >, BEntryList, and BDict< BString >.

template<class T >
void BList< T >::deleteFirst (  )  [inline]

Delete fisrt item.

template<class T >
void BList< T >::deleteLast (  )  [inline]

Delete last item.

template<class T >
BIter BList< T >::end ( BIter i  )  const [inline]

Iterator for end of list.

template<class T >
BIter BList< T >::end (  )  const [inline]

Iterator for end of list.

template<class T >
T & BList< T >::front (  )  [inline]

Get first item in list.

template<class T >
const T & BList< T >::get ( BIter  i  )  const [inline]

Get item specified by iterator in list.

template<class T >
T & BList< T >::get ( BIter  i  )  [inline]

Get item specified by iterator in list.

template<class T >
BIter BList< T >::goTo ( int  pos  )  const [inline]

Iterator for pos item in list.

template<class T>
int BList< T >::has ( const T &  i  )  const [inline]

Checks if the item is in the list.

template<class T>
void BList< T >::insert ( BIter i,
const T &  item 
) [inline, virtual]

Insert item before item.

Reimplemented in BDict< Type >, BEntryList, and BDict< BString >.

template<class T>
void BList< T >::insertAfter ( BIter i,
const T &  item 
) [inline]

Insert item after item.

template<class T >
int BList< T >::isEnd ( BIter i  )  const [inline]

True if iterator refers to last item.

template<class T >
void BList< T >::next ( BIter i  )  const [inline]

Iterator for next item in list.

template<class T>
BList< T >::Node * BList< T >::nodeCreate (  )  [inline, private, virtual]
template<class T>
BList< T >::Node * BList< T >::nodeCreate ( const T &  item  )  [inline, protected, virtual]
template<class T >
const BList< T >::Node * BList< T >::nodeGet ( BIter  i  )  const [inline, protected, virtual]
template<class T >
BList< T >::Node * BList< T >::nodeGet ( BIter  i  )  [inline, protected, virtual]
template<class T >
unsigned int BList< T >::number (  )  const [inline]

Number of items in list.

template<class T>
BList< T > BList< T >::operator+ ( const BList< T > &  l  )  const [inline]

Reimplemented in BDict< Type >, and BDict< BString >.

template<class T>
BList< T > & BList< T >::operator= ( const BList< T > &  l  )  [inline]

Reimplemented in BDict< Type >, BEntryList, and BDict< BString >.

template<class T >
const T & BList< T >::operator[] ( const BIter i  )  const [inline]

Reimplemented in BDict< Type >, and BDict< BString >.

template<class T >
T & BList< T >::operator[] ( BIter  i  )  [inline]
template<class T >
const T & BList< T >::operator[] ( int  i  )  const [inline]
template<class T >
T & BList< T >::operator[] ( int  i  )  [inline]
template<class T >
T BList< T >::pop (  )  [inline]

Pop item from list deleteing item.

template<class T >
int BList< T >::position ( BIter  i  )  [inline]

Postition in list item with iterator i.

template<class T >
void BList< T >::prev ( BIter i  )  [inline]

Iterator for previous item in list.

template<class T>
void BList< T >::push ( const T &  i  )  [inline]

Push item onto list.

template<class T>
void BList< T >::queueAdd ( const T &  i  )  [inline]

Add item to end of list.

template<class T >
T BList< T >::queueGet (  )  [inline]

Get item from front of list deleteing item.

template<class T >
T & BList< T >::rear (  )  [inline]

Get last item in list.

template<class T >
unsigned int BList< T >::size (  )  const [inline]

Number of items in list.

template<class T >
void BList< T >::sort ( SortFunc  func  )  [inline]

Sort list based on Sort func.

template<class T >
void BList< T >::sort (  )  [inline]

Sort list based on get(i) values.

template<class T >
void BList< T >::start ( BIter i  )  const [inline]

Iterator to start of list.

template<class T >
void BList< T >::swap ( BIter  i1,
BIter  i2 
) [inline]

Swap two items in list.


Member Data Documentation

template<class T>
unsigned int BList< T >::olength [protected]
template<class T>
Node* BList< T >::onodes [protected]

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

Generated on 2 Mar 2016 for LibBeamApi by  doxygen 1.6.1