template <class T> class NstList : public NstTree, private list<T*>

List template

Inheritance:


Public Methods

const_reference back()
Returns the last element of the list
reference back()
Returns the last element of the list
virtual int base_type()
Gives the base type of the object.
const_iterator begin()
Returns a constant iterator containing the first element of the list
iterator begin()
Returns an iterator containing the first element of the list
virtual const char* class_name()
Returns the string NstList.
virtual const char* class_type()
Returns the string NST_LIST.
void clear()
Deletes all elements of the list
virtual NstList <T> * clone()
Clone operator
void copy(const NstList<T>& s)
The list becomes the copy of a given list
void cutpaste(NstList<T>* x)
Cuts each element from the list x (with the method cut) and inserts them at the end of the list
bool empty()
Returns TRUE (1) if the list is empty.
iterator end()
Returns the last iterator of the list
const_iterator end()
Returns the last iterator of the list
iterator erase(iterator position)
Deletes an iterator and its content
iterator find(T* value)
Finds an element
const_reference front()
Returns the first element of the list
reference front()
Returns the first element of the list
NstTree* init()
Returns the first element of the list
iterator insert(iterator position, T& x)
Insert a new element in the list before the iterator position
size_type max_size()
Returns the maximum number of elements that the list can contain.
NstTree* next()
Returns the next element of the list
NstList()
Creates an empty list
NstList(const NstList<T>& x)
Recursive copy constructor
NstList <T> & operator=(const NstList<T>& x)
The list becomes the copy of a given list
void pop_back()
Deletes the last element of the list
void pop_front()
Deletes the first element of the list
void push_back(T& x)
Inserts a new element at the end of the list
void push_front(T& x)
Inserts a new element at the beginning of the list
const_reverse_iterator rbegin()
Returns a constant iterator containing the first element of the list in reverse order
reverse_iterator rbegin()
Returns an iterator containing the first element of the list in reverse order
void remove(T* value)
Remove the element that have a given address
const_reverse_iterator rend()
Returns the last iterator of the list in reverse order
reverse_iterator rend()
Returns the last iterator of the list in reverse order
size_type size()
Returns the number of elements in the list.
virtual int type()
The type is NST_LIST.
~NstList()
Recursive destructor

Inherited from NstTree:

Public Fields

unsigned long tree_id
NstUserInfo user_info

Public Methods

virtual NstTree* create_default()
virtual NstTree* cut()
NstTree* cut_buffer()
virtual void error(const char* st)
list <NstTree*> fathers()
NstTree* in()
friend ostream& operator << (ostream& s, const NstTree& t)
NstTree& operator= (const NstTree& s)
virtual void replace(NstTree& n)
virtual NstDefinition* search(const NstIdentifier& i, int tp = -1)
void traversal(int (*action)(NstTree*, void*), void* extra = NULL)
NstTree* upsearch(int (*comptest)(NstTree*, void*), void* extra = NULL)
virtual void warning(const char* st)
string whoami()

Documentation

List template. This is the base template for lists in the Nestor structure.
virtual int type()
The type is NST_LIST.

virtual const char* class_type()
Returns the string NST_LIST.

virtual const char* class_name()
Returns the string NstList.

virtual int base_type()
Gives the base type of the object.

iterator begin()
Returns an iterator containing the first element of the list

iterator end()
Returns the last iterator of the list. This iterator has no content.

reverse_iterator rbegin()
Returns an iterator containing the first element of the list in reverse order

reverse_iterator rend()
Returns the last iterator of the list in reverse order

const_iterator begin()
Returns a constant iterator containing the first element of the list. Constant means that the content of this iterator cannot be modified.

const_iterator end()
Returns the last iterator of the list. This iterator has no content.

const_reverse_iterator rbegin()
Returns a constant iterator containing the first element of the list in reverse order

const_reverse_iterator rend()
Returns the last iterator of the list in reverse order

bool empty()
Returns TRUE (1) if the list is empty.

size_type size()
Returns the number of elements in the list.

size_type max_size()
Returns the maximum number of elements that the list can contain.

iterator insert(iterator position, T& x)
Insert a new element in the list before the iterator position. This element is copied before insertion if it is a "regular" object. The element is not copied if it is shared. If the element inserted has been cutted, it is inserted without copy, and the father of this element becomes this list. Returns the new iterator created. @param position the new element is inserted before this iterator. @param x element to insert.

void push_front(T& x)
Inserts a new element at the beginning of the list. This method is a shortcut for {\texttt insert(begin(), x)}. The same rules as insert apply here.

void push_back(T& x)
Inserts a new element at the end of the list. This method is a shortcut for {\texttt insert(end(), x)}.The same rules as insert apply here.

void cutpaste(NstList<T>* x)
Cuts each element from the list x (with the method cut) and inserts them at the end of the list. Thus, after a call to this method, x is empty.

iterator erase(iterator position)
Deletes an iterator and its content. Returns the next element of the list. The content of the iterator is not deleted if it is a shared object, for instance a variable definition.

void pop_front()
Deletes the first element of the list. Shortcut for erase(begin()).

void pop_back()
Deletes the last element of the list. Shortcut for iterator tmp = end(); erase(--tmp).

void clear()
Deletes all elements of the list

void remove(T* value)
Remove the element that have a given address

iterator find(T* value)
Finds an element

reference front()
Returns the first element of the list

const_reference front()
Returns the first element of the list

reference back()
Returns the last element of the list

const_reference back()
Returns the last element of the list

NstList <T> & operator=(const NstList<T>& x)
The list becomes the copy of a given list. Note that the copy is recursive.

void copy(const NstList<T>& s)
The list becomes the copy of a given list. Note that the copy is recursive.

NstList()
Creates an empty list

NstList(const NstList<T>& x)
Recursive copy constructor

~NstList()
Recursive destructor

virtual NstList <T> * clone()
Clone operator

NstTree* init()
Returns the first element of the list

NstTree* next()
Returns the next element of the list. Note that this method must be used after a call to init. You should not use this method while modifying the list.


Direct child classes:
NstVariableList
NstUnitList
NstStatementList
NstShapeList
NstParameterList
NstOnList
NstExpressionList
NstDistributionList
NstDistformatList
NstDefinitionList
NstDeclarationList
NstConstantList

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de