PLearn 0.1
|
The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
#include <PLStringutilsTest.h>
Public Member Functions | |
PLStringutilsTest () | |
Default constructor. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual PLStringutilsTest * | 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
Definition at line 57 of file PLStringutilsTest.h.
typedef PTest PLearn::PLStringutilsTest::inherited [private] |
Reimplemented from PLearn::PTest.
Definition at line 59 of file PLStringutilsTest.h.
PLearn::PLStringutilsTest::PLStringutilsTest | ( | ) |
string PLearn::PLStringutilsTest::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
OptionList & PLearn::PLStringutilsTest::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
RemoteMethodMap & PLearn::PLStringutilsTest::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
Object * PLearn::PLStringutilsTest::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
StaticInitializer PLStringutilsTest::_static_initializer_ & PLearn::PLStringutilsTest::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
void PLearn::PLStringutilsTest::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 61 of file PLStringutilsTest.cc.
{ inherited::build(); build_(); }
void PLearn::PLStringutilsTest::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::PTest.
Definition at line 99 of file PLStringutilsTest.cc.
{ }
string PLearn::PLStringutilsTest::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
void PLearn::PLStringutilsTest::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares the class options.
Reimplemented from PLearn::PTest.
Definition at line 84 of file PLStringutilsTest.cc.
{ // ### ex: // declareOption(ol, "myoption", &PLStringutilsTest::myoption, // OptionBase::buildoption, // "Help text describing this option"); // ... // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::PLStringutilsTest::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::PTest.
Definition at line 84 of file PLStringutilsTest.h.
:
//##### Protected Options ###############################################
PLStringutilsTest * PLearn::PLStringutilsTest::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
OptionList & PLearn::PLStringutilsTest::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
OptionMap & PLearn::PLStringutilsTest::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
RemoteMethodMap & PLearn::PLStringutilsTest::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 50 of file PLStringutilsTest.cc.
void PLearn::PLStringutilsTest::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::PTest.
Definition at line 70 of file PLStringutilsTest.cc.
References PLERROR.
{ inherited::makeDeepCopyFromShallowCopy(copies); // ### ex: // deepCopyField(trainvec, copies); // ### Remove this line when you have fully implemented this method. PLERROR("PLStringutilsTest::makeDeepCopyFromShallowCopy not fully (correctly) implemented yet!"); }
void PLearn::PLStringutilsTest::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.
Reimplemented from PLearn::PTest.
Definition at line 106 of file PLStringutilsTest.cc.
References PLearn::addprepostfix(), PLearn::endl(), PLearn::pout, PLearn::string_begins_with(), and PLearn::string_ends_with().
{ // Currently only test the 'begins_with' and 'ends_with' functions. // More tests may (should!) be added in the future. string s1 = "Hello"; string s2 = "Hello World"; string s3 = "Hell no!"; string s4 = "Say Hello"; string s5 = "Say Hello!"; string s6 = "Say Jello"; string s7 = "Hello\n \n\nWorld\n"; string s8 = "\nHello\nWorld"; pout << string_begins_with(s2, s1) << endl; pout << string_begins_with(s3, s1) << endl; pout << string_ends_with(s4, s1) << endl; pout << string_ends_with(s5, s1) << endl; pout << string_ends_with(s6, s1) << endl; pout << addprepostfix("pre-", s7, "-post") << endl; pout << addprepostfix("pre-", s8, "-post") << endl; }
Reimplemented from PLearn::PTest.
Definition at line 84 of file PLStringutilsTest.h.