Pegmatite
Public Types | Public Member Functions | List of all members
pegmatite::ASTList< T > Class Template Reference

A list of objects. More...

#include <ast.hh>

Inheritance diagram for pegmatite::ASTList< T >:
pegmatite::ASTMember

Public Types

typedef std::list< std::unique_ptr< T > > container
 list type.
 

Public Member Functions

 ASTList ()
 the default constructor.
 
 ASTList (const ASTList< T > &src)
 duplicates the objects of the given list. More...
 
const containerobjects () const
 returns the container of objects. More...
 
size_t size ()
 
bool empty () const
 
container::iterator begin ()
 
container::iterator end ()
 
container::reverse_iterator rbegin ()
 
container::reverse_iterator rend ()
 
container::const_iterator begin () const
 
container::const_iterator end () const
 
container::const_reverse_iterator rbegin () const
 
container::const_reverse_iterator rend () const
 
virtual void construct (const InputRange &r, ASTStack &st)
 Pops objects of type T from the stack (st) until no more objects can be popped.
 
- Public Member Functions inherited from pegmatite::ASTMember
 ASTMember ()
 On construction, ASTMember sets its container_node field to the ASTContainer currently under construction and registers itself with the container, to be notified during the construction phase.
 
ASTContainercontainer () const
 Returns the container of which this object is a field.
 

Additional Inherited Members

- Protected Attributes inherited from pegmatite::ASTMember
ASTContainercontainer_node
 The container that owns this object.
 

Detailed Description

template<class T>
class pegmatite::ASTList< T >

A list of objects.

It pops objects of the given type from the ast stack, until no more objects can be popped. It assumes ownership of objects.

Template Parameters
Ttype of object to control.

Constructor & Destructor Documentation

template<class T>
pegmatite::ASTList< T >::ASTList ( const ASTList< T > &  src)
inline

duplicates the objects of the given list.

Parameters
srcsource object.

Member Function Documentation

template<class T>
const container& pegmatite::ASTList< T >::objects ( ) const
inline

returns the container of objects.

Returns
the container of objects.

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