LibBeamApi
1.3.0
|
Template based list class. More...
#include <BList.h>
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. | |
T | pop () |
Pop item from list deleteing item. | |
void | queueAdd (const T &i) |
Add item to end of list. | |
T | 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 Node * | nodeGet (BIter i) |
virtual const Node * | nodeGet (BIter i) const |
virtual Node * | nodeCreate (const T &item) |
Protected Attributes | |
Node * | onodes |
unsigned int | olength |
Private Member Functions | |
virtual Node * | nodeCreate () |
Template based list class.
typedef int(* BList::SortFunc)(T &a, T &b) |
Prototype for sorting function.
BList::BList | ( | ) |
BList::BList | ( | const BList< T > & | l | ) |
BList::~BList | ( | ) | [virtual] |
void BList::append | ( | const T & | item | ) |
Append item to list.
void BList::append | ( | const BList< T > & | l | ) |
Append list to list.
BIter BList::begin | ( | ) | const |
Iterator for start of list.
void BList::clear | ( | ) | [virtual] |
Clear the list.
Reimplemented in BEntryFile, BDir, BEntryList, and BDict.
void BList::del | ( | BIter & | i | ) | [virtual] |
Delete specified item.
Reimplemented in BEntryList, and BDict.
void BList::deleteFirst | ( | ) |
Delete fisrt item.
void BList::deleteLast | ( | ) |
Delete last item.
BIter BList::end | ( | ) | const |
Iterator for end of list.
T & BList::front | ( | ) |
Get first item in list.
T & BList::get | ( | BIter | i | ) |
Get item specified by iterator in list.
const T & BList::get | ( | BIter | i | ) | const |
Get item specified by iterator in list.
BIter BList::goTo | ( | int | pos | ) | const |
Iterator for pos item in list.
int BList::has | ( | const T & | i | ) | const |
Checks if the item is in the list.
void BList::insert | ( | BIter & | i, |
const T & | item | ||
) | [virtual] |
Insert item before item.
void BList::insertAfter | ( | BIter & | i, |
const T & | item | ||
) |
Insert item after item.
int BList::isEnd | ( | BIter & | i | ) | const |
True if iterator refers to last item.
void BList::next | ( | BIter & | i | ) | const |
Iterator for next item in list.
unsigned int BList::number | ( | ) | const |
Number of items in list.
T & BList::operator[] | ( | int | i | ) |
const T & BList::operator[] | ( | int | i | ) | const |
T & BList::operator[] | ( | BIter | i | ) |
T BList::pop | ( | ) |
Pop item from list deleteing item.
int BList::position | ( | BIter | i | ) |
Postition in list item with iterator i.
void BList::prev | ( | BIter & | i | ) |
Iterator for previous item in list.
void BList::push | ( | const T & | i | ) |
Push item onto list.
void BList::queueAdd | ( | const T & | i | ) |
Add item to end of list.
T BList::queueGet | ( | ) |
Get item from front of list deleteing item.
T & BList::rear | ( | ) |
Get last item in list.
unsigned int BList::size | ( | ) | const |
Number of items in list.
void BList::sort | ( | ) |
Sort list based on get(i) values.
void BList::sort | ( | SortFunc | func | ) |
Sort list based on Sort func.
void BList::start | ( | BIter & | i | ) | const |
Iterator to start of list.
unsigned int BList::olength [protected] |
Node* BList::onodes [protected] |