PLearn 0.1
|
The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
#include <PPTest.h>
Public Member Functions | |
PPTest () | |
Default constructor. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual PPTest * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Post-constructor. | |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Transforms a shallow copy into a deep copy. | |
virtual void | perform () |
The method performing the test. | |
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_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declares the class options. | |
Private Types | |
typedef PTest | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
The first sentence should be a BRIEF DESCRIPTION of what the class does.
Place the rest of the class programmer documentation here. Doxygen supports Javadoc-style comments. See http://www.doxygen.org/manual.html
typedef PTest PLearn::PPTest::inherited [private] |
Reimplemented from PLearn::PTest.
PLearn::PPTest::PPTest | ( | ) |
string PLearn::PPTest::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
OptionList & PLearn::PPTest::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
RemoteMethodMap & PLearn::PPTest::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Reimplemented from PLearn::PTest.
Object * PLearn::PPTest::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
StaticInitializer PPTest::_static_initializer_ & PLearn::PPTest::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
void PLearn::PPTest::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::PTest.
Definition at line 97 of file PPTest.cc.
{ inherited::build(); build_(); }
void PLearn::PPTest::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::PTest.
Definition at line 143 of file PPTest.cc.
{ // ### This method should do the real building of the object, // ### according to set 'options', in *any* situation. // ### Typical situations include: // ### - Initial building of an object from a few user-specified options // ### - Building of a "reloaded" object: i.e. from the complete set of all serialised options. // ### - Updating or "re-building" of an object after a few "tuning" options have been modified. // ### You should assume that the parent class' build_() has already been called. }
string PLearn::PPTest::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
void PLearn::PPTest::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares the class options.
Reimplemented from PLearn::PTest.
Definition at line 123 of file PPTest.cc.
{ // ### Declare all of this object's options here // ### For the "flags" of each option, you should typically specify // ### one of OptionBase::buildoption, OptionBase::learntoption or // ### OptionBase::tuningoption. Another possible flag to be combined with // ### is OptionBase::nosave // ### ex: // declareOption(ol, "myoption", &PPTest::myoption, OptionBase::buildoption, // "Help text describing this option"); // ... // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::PPTest::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::PTest.
Definition at line 88 of file PPTest.h.
:
//##### Protected Options ###############################################
Reimplemented from PLearn::PTest.
OptionList & PLearn::PPTest::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
OptionMap & PLearn::PPTest::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
RemoteMethodMap & PLearn::PPTest::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
void PLearn::PPTest::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::PTest.
Definition at line 106 of file PPTest.cc.
References PLERROR.
{ inherited::makeDeepCopyFromShallowCopy(copies); // ### Call deepCopyField on all "pointer-like" fields // ### that you wish to be deepCopied rather than // ### shallow-copied. // ### ex: // deepCopyField(trainvec, copies); // ### Remove this line when you have fully implemented this method. PLERROR("PPTest::makeDeepCopyFromShallowCopy not fully (correctly) implemented yet!"); }
void PLearn::PPTest::perform | ( | ) | [virtual] |
The method performing the test.
A typical test consists in some output (to pout and / or perr), and updates of this object's options.
is not fonctionnal for the moment
Reimplemented from PLearn::PTest.
Definition at line 842 of file PPTest.cc.
References PLearn::Test_PP::accessPointedObject(), PLearn::Test_PP::affectationFromOrdPtr(), PLearn::Test_PP::affectationFromPP(), PLearn::Test_PP::conversionOrdinaryPtr(), PLearn::Test_PP::copieConsChildPP(), PLearn::Test_PP::copieConsOrdinaryPtr(), PLearn::Test_PP::copieConsSameTypePP(), DO_TEST, PLearn::Test_PP::emptyCons(), PLearn::endl(), and PLearn::Test_PP::illegalCopieCons().
{ Test_PP tpp; cout << "Launching Test_TVec..." << endl; DO_TEST("Empty Constructors", tpp.emptyCons()); DO_TEST("Copie Constructors with Ordinary Pointers", tpp.copieConsOrdinaryPtr()); DO_TEST("Copie Constructors with same PP type pointers",tpp.copieConsSameTypePP()); DO_TEST("Copie Constructors with other(child) PP type pointers",tpp.copieConsChildPP()); #ifdef CHECK_COMPILATION DO_TEST("Illegal Copie Constructors",tpp.illegalCopieCons()); #endif DO_TEST("Conversion to ordinary pointers",tpp.conversionOrdinaryPtr()); DO_TEST("Access pointed objects",tpp.accessPointedObject()); DO_TEST("Affectation from ordinary pointers", tpp.affectationFromOrdPtr()); DO_TEST("Affectation between PP pointers",tpp.affectationFromPP()); //DO_TEST("Deep Copy of a PP<childA> root",tpp.tryDeepCopy()); cout << "Quitting Test_TVec..." << endl; }
Reimplemented from PLearn::PTest.