sub_functor_list Class Reference

#include <list.h>


Public Member Functions

virtual ~sub_functor_list ()
 sub_functor_list ()
void push_back (sub_functor::pointer sfp)
sub_functor::pointer get (size_t n) const
sub_functor::pointer operator[] (size_t n) const
size_t size () const
bool empty () const
void match (const nstring &name, sub_functor_list &result)
void clear ()
sub_functor::pointer find (const nstring &name) const

Private Member Functions

 sub_functor_list (const sub_functor_list &)
sub_functor_listoperator= (const sub_functor_list &)

Private Attributes

sub_functor::pointerlist
size_t length
size_t maximum


Detailed Description

The sub_functor_list class is used to represent a list ofr pointers to sub_functor instances.

Definition at line 29 of file list.h.


Constructor & Destructor Documentation

virtual sub_functor_list::~sub_functor_list (  )  [virtual]

The destructor.

sub_functor_list::sub_functor_list (  ) 

The default constructor.

sub_functor_list::sub_functor_list ( const sub_functor_list  )  [private]

The copy constructor. Do not use.


Member Function Documentation

void sub_functor_list::push_back ( sub_functor::pointer  sfp  ) 

The push_back method is used to append another functor to the end of the fuctor list.

Parameters:
sfp The functor to add to the end of the list

sub_functor::pointer sub_functor_list::get ( size_t  n  )  const

The get method is used to obtain the nth element of the list.

Parameters:
n The number (zero based) of the element of interest.

sub_functor::pointer sub_functor_list::operator[] ( size_t  n  )  const [inline]

The array index operator method is used to obtain the nth element of the list.

Parameters:
n The number (zero based) of the element of interest.

Definition at line 67 of file list.h.

size_t sub_functor_list::size (  )  const [inline]

The size method is used to obtain the number of elements in the list at the moment.

Definition at line 73 of file list.h.

bool sub_functor_list::empty (  )  const [inline]

The empty method is used to determie whether or not the list is empty at the moment.

Definition at line 79 of file list.h.

void sub_functor_list::match ( const nstring name,
sub_functor_list result 
)

The match method is ised to test the gven string against the names of all the functors in the list, treating the names as arglex_compare patterns.

Parameters:
name The name of the substitution being looked for
result each matching functor is appended to the list. It is possible for there to be no matches.

void sub_functor_list::clear (  ) 

The clear method is used to discard all contents of the list

sub_functor::pointer sub_functor_list::find ( const nstring name  )  const

The find method is used to find a list element by name. This differs from the match method in that it looks for an exact name match, not a pattern match.

Parameters:
name The name of the functor to look for
Returns:
pointer to functor, or NULL if not found

sub_functor_list& sub_functor_list::operator= ( const sub_functor_list  )  [private]

The assignment operator. Do not use.


Field Documentation

The list instance variable is used to remember the address of the base of the dynamically allocated array of pointers to functors.

Definition at line 117 of file list.h.

size_t sub_functor_list::length [private]

The length instance variable is used to remember how much of the array of pointer to functors has been used to date.

Definition at line 123 of file list.h.

size_t sub_functor_list::maximum [private]

The maximum instance variable is used to remember the number of elements allocated to the array of pointers to functors.

Definition at line 129 of file list.h.


The documentation for this class was generated from the following file:

Generated on Wed Mar 12 23:37:44 2008 for Aegis by  doxygen 1.5.5