template<class T> class ASTlist

The purpose of this type is to be a template class just like the base "List" is, but with the added caveat that it works on ASTnodes that are part of an AST star file tree.

Inheritance:


Public Fields

[more]typedef vector : :reverse_iterator reverse_iterator
[more]typedef vector : :const_reverse_iterator const_reverse_iterator
[more]typedef vector : :const_iterator const_iterator
[more]typedef vector : :iterator iterator

Public Methods

[more] ASTlist (const List<T> & L)
copy constructor
[more] ASTlist ( ASTnode* parent )
constructor (default)
[more] ASTlist (const ASTlist<T> & L)
constructor (giving the parent node)
[more]void AddToEnd (ASTlist<T> &appendMe)
DEPRECIATED
[more]void AlterCurrent (T k)
DEPRECIATED
[more]void Insert (ASTlist<T> &appendMe)
DEPRECIATED
[more]void InsertAfter (ASTlist<T> &appendMe)
DEPRECIATED
[more]void insert ( iterator pos, size_type n, const T& x)
Identical to the STL vector method of the same prototype
[more]iterator insert ( iterator pos, const T& x )
Identical to the STL vector method of the same prototype
[more]void insert ( iterator pos, T* first, T* last )
Identical to the STL vector method of the same prototype
[more]void setParent ( ASTnode* setToThis )
setParent() - sets the parent ASTnode that this list is inside of.

Public Members

[more]
[more]typedef const value_type* const_pointer
[more]typedef const value_type& const_reference
[more] copy constructor for List<>
[more]typedef size_t difference_type
[more]typedef value_type* pointer
[more]typedef value_type& reference
[more]typedef size_t size_type
[more]typedef T value_type


Inherited from List:

Public Methods

obool AtEnd() const
obool AtStart() const
oT Current()
ovoid FreeList()
oT Last() const
oint Length() const
obool Lookup(T k)
ovoid MemorizeCurrent()
ovoid Next()
ovoid Prev()
ovoid RemoveCurrent()
ovoid Reset()
ovoid RestoreCurrent()
obool SeekTo( T obj )
oList& operator = (const List<T> & dl)


Documentation

The purpose of this type is to be a template class just like the base "List" is, but with the added caveat that it works on ASTnodes that are part of an AST star file tree. The idea is that the list itself remembers who it's parent is, and therefore it can propigate that parent on to any new AST objects that are attached to the list.

WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! =========================================================== Although this class is a template that looks like it should work on any class, it REALLY only works correctly on classes derived from ASTnode. It will crash the code (segfault) if you try to use this list on a type which is not derived from ASTnode. Due to a nasty syntax catch-22, I was forced to make this look like it would operate on any generic class. (template would not work).

otypedef T value_type

otypedef value_type* pointer

otypedef const value_type* const_pointer

otypedef value_type& reference

otypedef const value_type& const_reference

otypedef size_t size_type

otypedef size_t difference_type

otypedef vector: :iterator iterator

otypedef vector: :const_iterator const_iterator

otypedef vector: :reverse_iterator reverse_iterator

otypedef vector: :const_reverse_iterator const_reverse_iterator

o ASTlist( ASTnode* parent )
constructor (default)

o ASTlist(const ASTlist<T> & L)
constructor (giving the parent node)

o ASTlist(const List<T> & L)
copy constructor

o copy constructor for List<>
copy constructor for List<>

ovoid setParent( ASTnode* setToThis )
setParent() - sets the parent ASTnode that this list is inside of. This parent will be propigated to any new ASTnodes that are added to this ASTlist. Thus if a user of the AST library gets a hold of one of the ASTlists that is in the library, that user can add new items to that list and still retain integrety.

o

o The following functions are identical to their equivilent functions in List<>, but they have been changed to ensure that the newly added ASTnodes will have the proper parent pointer copied to them.
The following functions are identical to their equivilent functions in List<>, but they have been changed to ensure that the newly added ASTnodes will have the proper parent pointer copied to them.

oiterator insert( iterator pos, const T& x )
Identical to the STL vector method of the same prototype

ovoid insert( iterator pos, T* first, T* last )
Identical to the STL vector method of the same prototype

ovoid insert( iterator pos, size_type n, const T& x)
Identical to the STL vector method of the same prototype

ovoid AddToEnd(ASTlist<T> &appendMe)
DEPRECIATED

ovoid Insert(ASTlist<T> &appendMe)
DEPRECIATED

ovoid InsertAfter(ASTlist<T> &appendMe)
DEPRECIATED

ovoid AlterCurrent(T k)
DEPRECIATED


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


Starlib is a creation of BioMagResBank: bmrb.wisc.edu starlib banner