PLearn 0.1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Member Functions | Private Member Functions
PLearn::SetOption Class Reference

#include <SetOption.h>

Inheritance diagram for PLearn::SetOption:
Inheritance graph
[legend]
Collaboration diagram for PLearn::SetOption:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Object inherited

Public Member Functions

 SetOption ()
virtual void build ()
 Post-constructor.
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.
void apply (PP< Object > obj)
 Will call obj->setOption(name, value)
void apply (PP< Object > obj, const map< string, string > &aliases)
 Will call obj->setOption(name, value); or if name is a key in aliases, it will call obj->setOption(aliases[name], value)
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual SetOptiondeepCopy (CopiesMap &copies) const

Static Public Member Functions

static string _classname_ ()
 Declares name and deepCopy methods.
static OptionList_getOptionList_ ()
static RemoteMethodMap_getRemoteMethodMap_ ()
static Object_new_instance_for_typemap_ ()
static bool _isa_ (const Object *o)
static void _static_initialize_ ()
static const PPathdeclaringFile ()

Public Attributes

string name
string value

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 Declares this class' options.

Private Member Functions

void build_ ()
 This does the actual building.

Detailed Description

Definition at line 48 of file SetOption.h.


Member Typedef Documentation

Reimplemented from PLearn::Object.

Definition at line 60 of file SetOption.h.


Constructor & Destructor Documentation

PLearn::SetOption::SetOption ( )

Definition at line 45 of file SetOption.cc.

    :Object()
{}

Member Function Documentation

string PLearn::SetOption::_classname_ ( ) [static]

Declares name and deepCopy methods.

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

OptionList & PLearn::SetOption::_getOptionList_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

RemoteMethodMap & PLearn::SetOption::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

bool PLearn::SetOption::_isa_ ( const Object o) [static]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

Object * PLearn::SetOption::_new_instance_for_typemap_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

StaticInitializer SetOption::_static_initializer_ & PLearn::SetOption::_static_initialize_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

void PLearn::SetOption::apply ( PP< Object obj) [inline]

Will call obj->setOption(name, value)

Definition at line 100 of file SetOption.h.

    { obj->setOption(name, value); }
void PLearn::SetOption::apply ( PP< Object obj,
const map< string, string > &  aliases 
)

Will call obj->setOption(name, value); or if name is a key in aliases, it will call obj->setOption(aliases[name], value)

Definition at line 79 of file SetOption.cc.

References name, and value.

{
    map<string, string>::const_iterator it = aliases.find(name);
    if(it!=aliases.end())
        obj->setOption(it->second, value);
    else 
        obj->setOption(name, value);    
}
void PLearn::SetOption::build ( ) [virtual]

Post-constructor.

The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::Object.

Definition at line 67 of file SetOption.cc.

References PLearn::Object::build(), and build_().

Here is the call graph for this function:

void PLearn::SetOption::build_ ( ) [private]

This does the actual building.

Reimplemented from PLearn::Object.

Definition at line 63 of file SetOption.cc.

Referenced by build().

{}

Here is the caller graph for this function:

string PLearn::SetOption::classname ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

void PLearn::SetOption::declareOptions ( OptionList ol) [static, protected]

Declares this class' options.

Reimplemented from PLearn::Object.

Definition at line 54 of file SetOption.cc.

References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::Object::declareOptions(), name, and value.

{
    declareOption(ol, "name", &SetOption::name, OptionBase::buildoption,
                  "name of the option to be set");
    declareOption(ol, "value", &SetOption::value, OptionBase::buildoption,
                  "value of the option to be set");
    inherited::declareOptions(ol);
}

Here is the call graph for this function:

static const PPath& PLearn::SetOption::declaringFile ( ) [inline, static]

Reimplemented from PLearn::Object.

Definition at line 108 of file SetOption.h.

SetOption * PLearn::SetOption::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

OptionList & PLearn::SetOption::getOptionList ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

OptionMap & PLearn::SetOption::getOptionMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

RemoteMethodMap & PLearn::SetOption::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 52 of file SetOption.cc.

void PLearn::SetOption::makeDeepCopyFromShallowCopy ( CopiesMap copies) [virtual]

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::Object.

Definition at line 74 of file SetOption.cc.

References PLearn::Object::makeDeepCopyFromShallowCopy().

Here is the call graph for this function:


Member Data Documentation

Reimplemented from PLearn::Object.

Definition at line 108 of file SetOption.h.

Definition at line 66 of file SetOption.h.

Referenced by apply(), and declareOptions().

Definition at line 67 of file SetOption.h.

Referenced by apply(), and declareOptions().


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