PLearn 0.1
Public Member Functions | Private Types
PLearn::TVecOption< ObjectType, VecElementType > Class Template Reference

#include <Option.h>

Inheritance diagram for PLearn::TVecOption< ObjectType, VecElementType >:
Inheritance graph
[legend]
Collaboration diagram for PLearn::TVecOption< ObjectType, VecElementType >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TVecOption (const string &optionname, TVec< VecElementType > ObjectType::*member_ptr, OptionBase::flag_t flags, const string &optiontype, const string &defaultval, const string &description, const OptionBase::OptionLevel &level)
virtual void readIntoIndex (Object *o, PStream &in, const string &index)
 Read into index "i" of the object's option; the index is a string for generality (i.e.
virtual void writeAtIndex (const Object *o, PStream &out, const string &index) const
 Write from index "i" of the object's option; the index is a string for generality (i.e.

Private Types

typedef Option< ObjectType,
TVec< VecElementType > > 
inherited

Detailed Description

template<class ObjectType, class VecElementType>
class PLearn::TVecOption< ObjectType, VecElementType >

Definition at line 297 of file Option.h.


Member Typedef Documentation

template<class ObjectType, class VecElementType>
typedef Option<ObjectType, TVec<VecElementType> > PLearn::TVecOption< ObjectType, VecElementType >::inherited [private]

Reimplemented from PLearn::Option< ObjectType, TVec< VecElementType > >.

Definition at line 299 of file Option.h.


Constructor & Destructor Documentation

template<class ObjectType, class VecElementType>
PLearn::TVecOption< ObjectType, VecElementType >::TVecOption ( const string &  optionname,
TVec< VecElementType > ObjectType::*  member_ptr,
OptionBase::flag_t  flags,
const string &  optiontype,
const string &  defaultval,
const string &  description,
const OptionBase::OptionLevel level 
) [inline]

Definition at line 302 of file Option.h.


Member Function Documentation

template<class ObjectType, class VecElementType>
virtual void PLearn::TVecOption< ObjectType, VecElementType >::readIntoIndex ( Object o,
PStream in,
const string &  index 
) [inline, virtual]

Read into index "i" of the object's option; the index is a string for generality (i.e.

applies to both vectors and maps)

Reimplemented from PLearn::OptionBase.

Definition at line 309 of file Option.h.

References i, PLearn::Option< ObjectType, TVec< VecElementType > >::ptr, and PLearn::tolong().

    {
        int i = tolong(index);
        in >> (dynamic_cast<ObjectType*>(o)->*(this->ptr))[i];
    }

Here is the call graph for this function:

template<class ObjectType, class VecElementType>
virtual void PLearn::TVecOption< ObjectType, VecElementType >::writeAtIndex ( const Object o,
PStream out,
const string &  index 
) const [inline, virtual]

Write from index "i" of the object's option; the index is a string for generality (i.e.

applies to both vectors and maps)

Reimplemented from PLearn::OptionBase.

Definition at line 315 of file Option.h.

References i, PLearn::Option< ObjectType, TVec< VecElementType > >::ptr, and PLearn::tolong().

    {
        int i = tolong(index);
        out << (dynamic_cast<ObjectType*>(const_cast<Object*>(o))->*(this->ptr))[i];
    }

Here is the call graph for this function:


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines