PLearn 0.1
Public Member Functions | Private Types
PLearn::TVecStaticOption< VecElementType > Class Template Reference

#include <Option.h>

Inheritance diagram for PLearn::TVecStaticOption< VecElementType >:
Inheritance graph
[legend]
Collaboration diagram for PLearn::TVecStaticOption< VecElementType >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TVecStaticOption (const string &optionname, TVec< VecElementType > *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 StaticOption< TVec
< VecElementType > > 
inherited

Detailed Description

template<class VecElementType>
class PLearn::TVecStaticOption< VecElementType >

Definition at line 327 of file Option.h.


Member Typedef Documentation

template<class VecElementType >
typedef StaticOption<TVec<VecElementType> > PLearn::TVecStaticOption< VecElementType >::inherited [private]

Reimplemented from PLearn::StaticOption< TVec< VecElementType > >.

Definition at line 329 of file Option.h.


Constructor & Destructor Documentation

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

Definition at line 332 of file Option.h.


Member Function Documentation

template<class VecElementType >
virtual void PLearn::TVecStaticOption< 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 339 of file Option.h.

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

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

Here is the call graph for this function:

template<class VecElementType >
virtual void PLearn::TVecStaticOption< 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 345 of file Option.h.

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

    {
        int i = tolong(index);
        out << (*(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