template class ASTlist : public List

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

typedef vector ::const_iterator const_iterator
typedef const value_type* const_pointer
typedef const value_type& const_reference
typedef vector ::const_reverse_iterator const_reverse_iterator
typedef size_t difference_type
typedef vector ::iterator iterator
typedef value_type* pointer
typedef value_type& reference
typedef vector ::reverse_iterator reverse_iterator
typedef size_t size_type
typedef T value_type

Public Methods

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

Public



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

copy constructor for List<>.

Inherited from List:

Public Methods

bool AtEnd() const
bool AtStart() const
T Current()
void FreeList()
T Last() const
int Length() const
bool Lookup(T k)
void MemorizeCurrent()
void Next()
List& operator = (const List & dl)
void Prev()
void RemoveCurrent()
void Reset()
void RestoreCurrent()
bool SeekTo( T obj )

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).
typedef T value_type

typedef value_type* pointer

typedef const value_type* const_pointer

typedef value_type& reference

typedef const value_type& const_reference

typedef size_t size_type

typedef size_t difference_type

typedef vector ::iterator iterator

typedef vector ::const_iterator const_iterator

typedef vector ::reverse_iterator reverse_iterator

typedef vector ::const_reverse_iterator const_reverse_iterator

ASTlist( ASTnode *parent )
constructor (default)

ASTlist(const ASTlist & L)
constructor (giving the parent node)

ASTlist(const List & L)
copy constructor

copy constructor for List<>.

ASTnode* myParent( void ) const
myParent() - gets the parent ASTnode that this list is contained inside. Returns NULL if this list is not contained inside a parent ASTnode.

void 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.

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.

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

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

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

void AddToEnd(ASTlist &appendMe)
DEPRECIATED

void Insert(ASTlist &appendMe)
DEPRECIATED

void InsertAfter(ASTlist &appendMe)
DEPRECIATED

void AlterCurrent(T k)
DEPRECIATED


This class has no child classes.

alphabetic index hierarchy of classes


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

generated by doc++