|
PLearn 0.1
|
#include <ParentableObject.h>


Public Member Functions | |
| TypedParentableObject (bool adoptive_parent=false, ParentKind=WeakParent) | |
| Default constructor. | |
| ParentT * | parent () |
| Typed version of parent accessor (hides the inherited one; this is OK) | |
| const ParentT * | parent () const |
| virtual void | checkParent () const |
| Override to ensure that the assumed parent type is satisfied. | |
| virtual string | classname () const |
| virtual OptionList & | getOptionList () const |
| virtual OptionMap & | getOptionMap () const |
| virtual RemoteMethodMap & | getRemoteMethodMap () const |
| virtual TypedParentableObject < ParentT > * | deepCopy (CopiesMap &copies) const |
| virtual void | build () |
| Post-constructor. | |
Static Public Member Functions | |
| static string | _classname_ () |
| static OptionList & | _getOptionList_ () |
| static RemoteMethodMap & | _getRemoteMethodMap_ () |
| static Object * | _new_instance_for_typemap_ () |
| static bool | _isa_ (const Object *o) |
| static void | _static_initialize_ () |
| static const PPath & | declaringFile () |
Static Public Attributes | |
| static StaticInitializer | _static_initializer_ |
Private Types | |
| typedef ParentableObject | inherited |
Private Member Functions | |
| void | build_ () |
| This does the actual building. | |
Definition at line 176 of file ParentableObject.h.
typedef ParentableObject PLearn::TypedParentableObject< ParentT >::inherited [private] |
Reimplemented from PLearn::ParentableObject.
Definition at line 178 of file ParentableObject.h.
| PLearn::TypedParentableObject< T >::TypedParentableObject | ( | bool | adoptive_parent = false, |
| ParentKind | pk = WeakParent |
||
| ) |
Default constructor.
Definition at line 224 of file ParentableObject.h.
: inherited(adoptive_parent, pk) { }
| string PLearn::TypedParentableObject< ParentT >::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::ParentableObject.
Definition at line 221 of file ParentableObject.h.
| OptionList & PLearn::TypedParentableObject< ParentT >::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::ParentableObject.
Definition at line 221 of file ParentableObject.h.
| RemoteMethodMap & PLearn::TypedParentableObject< ParentT >::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::ParentableObject.
Definition at line 221 of file ParentableObject.h.
| bool PLearn::TypedParentableObject< ParentT >::_isa_ | ( | const Object * | o | ) | [static] |
Reimplemented from PLearn::ParentableObject.
Definition at line 221 of file ParentableObject.h.
| Object * PLearn::TypedParentableObject< ParentT >::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 221 of file ParentableObject.h.
| void PLearn::TypedParentableObject< ParentT >::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::ParentableObject.
Definition at line 221 of file ParentableObject.h.
| void PLearn::TypedParentableObject< T >::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::ParentableObject.
Definition at line 229 of file ParentableObject.h.
References PLearn::ParentableObject::build(), and PLearn::TypedParentableObject< ParentT >::build_().
{
inherited::build();
build_();
}

| void PLearn::TypedParentableObject< T >::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::ParentableObject.
Definition at line 236 of file ParentableObject.h.
References PLearn::TypedParentableObject< ParentT >::checkParent(), and PLearn::ParentableObject::m_parent.
Referenced by PLearn::TypedParentableObject< ParentT >::build().
{
// We simply dynamically check that the parent, if any, makes sense
if (m_parent)
checkParent();
}


| void PLearn::TypedParentableObject< T >::checkParent | ( | ) | const [virtual] |
Override to ensure that the assumed parent type is satisfied.
Reimplemented from PLearn::ParentableObject.
Definition at line 244 of file ParentableObject.h.
References PLearn::Object::classname(), PLearn::ParentableObject::m_parent, PLASSERT, and PLERROR.
Referenced by PLearn::TypedParentableObject< ParentT >::build_().
{
// We simply dynamically check that the parent, makes sense
PLASSERT( m_parent );
if (! dynamic_cast<T*>(m_parent))
PLERROR("TypedParentableObject::checkParent: Expected a parent of type %s\n"
"but got one of type %s", T::_classname_().c_str(),
m_parent->classname().c_str());
}


| string PLearn::TypedParentableObject< ParentT >::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 221 of file ParentableObject.h.
| static const PPath& PLearn::TypedParentableObject< ParentT >::declaringFile | ( | ) | [inline, static] |
| TypedParentableObject< ParentT > * PLearn::TypedParentableObject< ParentT >::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::ParentableObject.
Definition at line 221 of file ParentableObject.h.
| OptionList & PLearn::TypedParentableObject< ParentT >::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 221 of file ParentableObject.h.
| OptionMap & PLearn::TypedParentableObject< ParentT >::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 221 of file ParentableObject.h.
| RemoteMethodMap & PLearn::TypedParentableObject< ParentT >::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 221 of file ParentableObject.h.
| const ParentT* PLearn::TypedParentableObject< ParentT >::parent | ( | ) | const [inline] |
Reimplemented from PLearn::ParentableObject.
Definition at line 190 of file ParentableObject.h.
References PLearn::ParentableObject::m_parent.
{
return static_cast<const ParentT*>(m_parent);
}
| ParentT* PLearn::TypedParentableObject< ParentT >::parent | ( | ) | [inline] |
Typed version of parent accessor (hides the inherited one; this is OK)
Reimplemented from PLearn::ParentableObject.
Definition at line 185 of file ParentableObject.h.
References PLearn::ParentableObject::m_parent.
{
return static_cast<ParentT*>(m_parent);
}
StaticInitializer PLearn::TypedParentableObject< ParentT >::_static_initializer_ [static] |
Reimplemented from PLearn::ParentableObject.
Definition at line 202 of file ParentableObject.h.
1.7.4