In file IndexList.hh:

template <class T, class Cmp = IndexSort> class IndexList

Defines a list with a case-insensitive index

Inheritance:


Public Fields

typedef T element_type
Element type
typedef std::vector <T> base_list
Base list
typedef base_list::iterator iterator
Iterator
typedef base_list::const_iterator const_iterator
Const Iterator
typedef Cmp sort_order
Sort order
typedef std::map <const char*, int, Cmp> index_type
Index list
typedef index_type::iterator index_iterator
Index iterator
typedef index_type::const_iterator const_index_iterator
Const index iterator

Public Methods

IndexList ()
Default constructor
IndexList (const IndexList& index)
Copy constructor
IndexList& operator= (const IndexList& index)
Assignment operator
const base_list& List () const
Index
base_list::iterator begin ()
begin
const_iterator begin () const
begin
base_list::iterator end ()
end
const_iterator end () const
end
const index_type& Index () const
Index
T* Get (const char* s)
Get
const T* Get (const char* s) const
Get
base_list::iterator GetPos (const char* s)
Get position
const_iterator GetPos (const char* s) const
Get position
T& operator[] (int pos)
Element access
const T& operator[] (int pos) const
Element access
void Add (const T& el)
Add
void Insert (const T& el)
Insert
void Remove (base_list::iterator pos)
Remove
void Remove (int pos)
Remove
void Remove (const char* name)
Remove
void Clear ()
Clear
int Size () const
Size
bool Empty () const
Empty?
void Sort ()
Sort

Protected Methods

void AddToIndex (base_list::iterator pos)
Index add
void RemoveFromIndex (base_list::iterator pos)
Index remove
void RebuildIndex ()
Rebuild index
void RebuildIndexAfterInsert (base_list::iterator pos)
Rebuild index

Documentation

Defines a list with a by default case-insensitive index.

typedef T element_type
Element type

typedef std::vector <T> base_list
Base list

typedef base_list::iterator iterator
Iterator

typedef base_list::const_iterator const_iterator
Const Iterator

typedef Cmp sort_order
Sort order

typedef std::map <const char*, int, Cmp> index_type
Index list

typedef index_type::iterator index_iterator
Index iterator

typedef index_type::const_iterator const_index_iterator
Const index iterator

IndexList()
Creates an empty index list

IndexList(const IndexList& index)
Copy constructor

IndexList& operator= (const IndexList& index)
Assignment operator

const base_list& List() const
Return the list

base_list::iterator begin()
Return the beginning of the list

const_iterator begin() const
Return the beginning of the list

base_list::iterator end()
Return the end of the list

const_iterator end() const
Return the end of the list

const index_type& Index() const
Return the index

T* Get(const char* s)
Get the element (uses the index)

const T* Get(const char* s) const
Get the element (uses the index)

base_list::iterator GetPos(const char* s)
Get the element position (uses the index)

const_iterator GetPos(const char* s) const
Get the element position (uses the index)

T& operator[] (int pos)
Element access by position

const T& operator[] (int pos) const
Element access by position

void Add(const T& el)
Adds an element to the end of the list

void Insert(const T& el)
Inserts an element

void Remove(base_list::iterator pos)
Removes an element from the list

void Remove(int pos)
Removes an element from the list

void Remove(const char* name)
Removes an element from the list

void Clear()
Clears the list

int Size() const
Size of the list

bool Empty() const
Empty list?

void Sort()
Sort the base list

void AddToIndex(base_list::iterator pos)
Add an entry to the index

void RemoveFromIndex(base_list::iterator pos)
Remove an entry from the index

void RebuildIndex()
Rebuild index

void RebuildIndexAfterInsert(base_list::iterator pos)
Rebuild index


This class has no child classes.
Author:
Written June 2001 by Masahiro Ito and Daniel Sigg
Version:
1.0

alphabetic index hierarchy of classes


Please send questions and comments to sigg_d@ligo-wa.caltech.edu


generated by doc++