FreePOOMA
2.4.1
|
AttributeWrapper<T> is a subclass of the abstract base class Attribute. More...
#include <AttributeWrapper.h>
Public Types | |
typedef Attribute | Base_t |
typedef AttributeWrapper< T > | This_t |
typedef T | Wrapped_t |
Public Member Functions | |
AttributeWrapper (Wrapped_t &array) | |
virtual | ~AttributeWrapper () |
Wrapped_t & | array () |
const Wrapped_t & | array () const |
virtual void | print (std::ostream &o) const |
Print the contents of the Array to the given stream. |
AttributeWrapper<T> is a subclass of the abstract base class Attribute.
It is templated on a class T, where T should be some form of Array or DynamicArray that supports a dynamic data structure interface.
AttributeWrapper is meant to be used as an external polymorphism derived class. You create an AttributeWrapper and give it an object to wrap around; the abstract base class is used to provide an abstract interface to a heterogenous collection of AttributeWrappers from some other user, for example a Particles class. Particles actually uses an AttributeList object to hold a collection of Attributes.
typedef Attribute AttributeWrapper< T >::Base_t |
typedef AttributeWrapper<T> AttributeWrapper< T >::This_t |
typedef T AttributeWrapper< T >::Wrapped_t |
AttributeWrapper< T >::AttributeWrapper | ( | Wrapped_t & | array | ) | [inline] |
virtual AttributeWrapper< T >::~AttributeWrapper | ( | ) | [inline, virtual] |
Wrapped_t& AttributeWrapper< T >::array | ( | ) | [inline] |
Referenced by AttributeWrapper< T >::print().
const Wrapped_t& AttributeWrapper< T >::array | ( | ) | const [inline] |
virtual void AttributeWrapper< T >::print | ( | std::ostream & | ) | const [inline, virtual] |
Print the contents of the Array to the given stream.
Implements Attribute.
References AttributeWrapper< T >::array(), and std::endl().