Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::Option< T, Enclosing > Class Template Reference

Template class for option definitions. More...

#include <ArrayAllocator.h>

Inheritance diagram for PLearn::Option< T, Enclosing >:

Inheritance graph
[legend]
Collaboration diagram for PLearn::Option< T, Enclosing >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T value_type
typedef Enclosing enclosing_type

Public Member Functions

 Option (const T &defaultValue, Enclosing *encl)
Enclosing & operator() (const T &newValue)
const T & operator() () const
 Option (const string &optionname, OptionType ObjectType::*member_ptr, flag_t flags, const string &optiontype, const string &defaultval, const string &description)
 Most of these parameters only serve to provide the user with an informative help text.

virtual void read (Object *o, PStream &in) const
virtual void read_and_discard (PStream &in) const
virtual void write (const Object *o, PStream &out) const
virtual ObjectgetAsObject (Object *o) const
virtual const ObjectgetAsObject (const Object *o) const
virtual ObjectgetIndexedObject (Object *o, int i) const
virtual const ObjectgetIndexedObject (const Object *o, int i) const
virtual string optionHolderClassName (const Object *o) const
 Returns the name of the class in to which this field belongs.


Protected Attributes

OptionType ObjectType::* ptr

Private Attributes

optionValue
Enclosing * enclosing

Detailed Description

template<class T, class Enclosing>
class PLearn::Option< T, Enclosing >

Template class for option definitions.

This class provides a unique stop to set all options in an ArrayAllocator object. These options must be passed upon constructing the object.

Definition at line 61 of file ArrayAllocator.h.


Member Typedef Documentation

template<class T, class Enclosing>
typedef Enclosing PLearn::Option< T, Enclosing >::enclosing_type
 

Definition at line 65 of file ArrayAllocator.h.

template<class T, class Enclosing>
typedef T PLearn::Option< T, Enclosing >::value_type
 

Definition at line 64 of file ArrayAllocator.h.


Constructor & Destructor Documentation

template<class T, class Enclosing>
PLearn::Option< T, Enclosing >::Option const T &  defaultValue,
Enclosing *  encl
[inline]
 

Definition at line 68 of file ArrayAllocator.h.

template<class T, class Enclosing>
PLearn::Option< T, Enclosing >::Option const string optionname,
OptionType ObjectType::*  member_ptr,
flag_t  flags,
const string optiontype,
const string defaultval,
const string description
[inline]
 

Most of these parameters only serve to provide the user with an informative help text.

(only optionname and saveit are really important)

Definition at line 65 of file Option.h.


Member Function Documentation

template<class T, class Enclosing>
virtual const Object* PLearn::Option< T, Enclosing >::getAsObject const Object o  )  const [inline, virtual]
 

Implements PLearn::OptionBase.

Definition at line 86 of file Option.h.

template<class T, class Enclosing>
virtual Object* PLearn::Option< T, Enclosing >::getAsObject Object o  )  const [inline, virtual]
 

Implements PLearn::OptionBase.

Definition at line 83 of file Option.h.

template<class T, class Enclosing>
virtual const Object* PLearn::Option< T, Enclosing >::getIndexedObject const Object o,
int  i
const [inline, virtual]
 

Implements PLearn::OptionBase.

Definition at line 92 of file Option.h.

template<class T, class Enclosing>
virtual Object* PLearn::Option< T, Enclosing >::getIndexedObject Object o,
int  i
const [inline, virtual]
 

Implements PLearn::OptionBase.

Definition at line 89 of file Option.h.

template<class T, class Enclosing>
const T& PLearn::Option< T, Enclosing >::operator()  )  const [inline]
 

Definition at line 76 of file ArrayAllocator.h.

template<class T, class Enclosing>
Enclosing& PLearn::Option< T, Enclosing >::operator() const T &  newValue  )  [inline]
 

Definition at line 72 of file ArrayAllocator.h.

template<class T, class Enclosing>
virtual string PLearn::Option< T, Enclosing >::optionHolderClassName const Object o  )  const [inline, virtual]
 

Returns the name of the class in to which this field belongs.

Implements PLearn::OptionBase.

Definition at line 95 of file Option.h.

template<class T, class Enclosing>
virtual void PLearn::Option< T, Enclosing >::read Object o,
PStream in
const [inline, virtual]
 

Implements PLearn::OptionBase.

Definition at line 70 of file Option.h.

template<class T, class Enclosing>
virtual void PLearn::Option< T, Enclosing >::read_and_discard PStream in  )  const [inline, virtual]
 

Implements PLearn::OptionBase.

Definition at line 72 of file Option.h.

template<class T, class Enclosing>
virtual void PLearn::Option< T, Enclosing >::write const Object o,
PStream out
const [inline, virtual]
 

Implements PLearn::OptionBase.

Definition at line 80 of file Option.h.


Member Data Documentation

template<class T, class Enclosing>
Enclosing* PLearn::Option< T, Enclosing >::enclosing [private]
 

Definition at line 82 of file ArrayAllocator.h.

template<class T, class Enclosing>
T PLearn::Option< T, Enclosing >::optionValue [private]
 

Definition at line 81 of file ArrayAllocator.h.

template<class T, class Enclosing>
OptionType ObjectType::* PLearn::Option< T, Enclosing >::ptr [protected]
 

Definition at line 59 of file Option.h.


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:22:33 2004 for PLearn by doxygen 1.3.7