|
PLearn 0.1
|
The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
#include <HTMLHelpGenerator.h>


Public Member Functions | |
| HTMLHelpGenerator (const PPath &output_dir_="", const PPath &resources_dir_="") | |
| Default constructor. | |
| virtual void | run () |
| Override this for runnable objects (default method issues a runtime error). | |
| void | helpCommands () |
| void | helpFunctions () |
| void | helpClasses () |
| virtual string | classname () const |
| virtual OptionList & | getOptionList () const |
| virtual OptionMap & | getOptionMap () const |
| virtual RemoteMethodMap & | getRemoteMethodMap () const |
| virtual HTMLHelpGenerator * | deepCopy (CopiesMap &copies) const |
| virtual void | build () |
| Post-constructor. | |
| virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
| Does the necessary operations to transform a shallow copy (this) into a deep copy by deep-copying all the members that need to be. | |
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 () |
Public Attributes | |
| PPath | output_dir |
| ### declare public option fields (such as build options) here Start your comments with Doxygen-compatible comments such as //! | |
| PPath | resources_dir |
| Directory for HTML resources (prologue, epilogue, index.html) e.g. | |
Static Public Attributes | |
| static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
| static void | declareOptions (OptionList &ol) |
| Declares the class options. | |
Private Types | |
| typedef Object | 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 HTMLHelpGenerator.h.
typedef Object PLearn::HTMLHelpGenerator::inherited [private] |
Reimplemented from PLearn::Object.
Definition at line 59 of file HTMLHelpGenerator.h.
| PLearn::HTMLHelpGenerator::HTMLHelpGenerator | ( | const PPath & | output_dir_ = "", |
| const PPath & | resources_dir_ = "" |
||
| ) |
Default constructor.
Definition at line 55 of file HTMLHelpGenerator.cc.
:output_dir(output_dir_), resources_dir(resources_dir_) {}
| string PLearn::HTMLHelpGenerator::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| OptionList & PLearn::HTMLHelpGenerator::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| RemoteMethodMap & PLearn::HTMLHelpGenerator::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| Object * PLearn::HTMLHelpGenerator::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| StaticInitializer HTMLHelpGenerator::_static_initializer_ & PLearn::HTMLHelpGenerator::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| void PLearn::HTMLHelpGenerator::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 97 of file HTMLHelpGenerator.cc.
References PLearn::Object::build(), and build_().
{
inherited::build();
build_();
}

| void PLearn::HTMLHelpGenerator::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::Object.
Definition at line 121 of file HTMLHelpGenerator.cc.
References PLearn::force_mkdir(), output_dir, PLearn::pathexists(), resources_dir, and PLearn::HelpSystem::setResourcesPathHTML().
Referenced by build().
{
if(output_dir != "" && !pathexists(output_dir))
force_mkdir(output_dir);
HelpSystem::setResourcesPathHTML(resources_dir);
}


| string PLearn::HTMLHelpGenerator::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| void PLearn::HTMLHelpGenerator::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares the class options.
Reimplemented from PLearn::Object.
Definition at line 108 of file HTMLHelpGenerator.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::Object::declareOptions(), output_dir, and resources_dir.
{
declareOption(ol, "output_dir", &HTMLHelpGenerator::output_dir,
OptionBase::buildoption,
"Directory where the .html files should be generated");
declareOption(ol, "resources_dir", &HTMLHelpGenerator::resources_dir,
OptionBase::buildoption,
"Directory where the HTML help resources should be found.");
inherited::declareOptions(ol);
}

| static const PPath& PLearn::HTMLHelpGenerator::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::Object.
Definition at line 90 of file HTMLHelpGenerator.h.
:
//##### Protected Options ###############################################
| HTMLHelpGenerator * PLearn::HTMLHelpGenerator::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| OptionList & PLearn::HTMLHelpGenerator::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| OptionMap & PLearn::HTMLHelpGenerator::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| RemoteMethodMap & PLearn::HTMLHelpGenerator::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 53 of file HTMLHelpGenerator.cc.
| void PLearn::HTMLHelpGenerator::helpClasses | ( | ) |
Definition at line 86 of file HTMLHelpGenerator.cc.
References PLearn::HelpSystem::helpClassesHTML(), PLearn::HelpSystem::helpOnClassHTML(), PLearn::HelpSystem::listClasses(), PLearn::openFile(), output_dir, and PLearn::PStream::raw_ascii.
Referenced by run().
{
openFile(output_dir/"classes_index.html", PStream::raw_ascii, "w")
<< HelpSystem::helpClassesHTML();
vector<string> commands= HelpSystem::listClasses();
for(vector<string>::iterator it= commands.begin();
it != commands.end(); ++it)
openFile(output_dir/"class_"+(*it)+".html", PStream::raw_ascii, "w")
<< HelpSystem::helpOnClassHTML(*it);
}


| void PLearn::HTMLHelpGenerator::helpCommands | ( | ) |
Definition at line 69 of file HTMLHelpGenerator.cc.
References PLearn::HelpSystem::helpCommandsHTML(), PLearn::HelpSystem::helpOnCommandHTML(), PLearn::HelpSystem::listCommands(), PLearn::openFile(), output_dir, and PLearn::PStream::raw_ascii.
Referenced by run().
{
openFile(output_dir/"commands_index.html", PStream::raw_ascii, "w")
<< HelpSystem::helpCommandsHTML();
vector<string> commands= HelpSystem::listCommands();
for(vector<string>::iterator it= commands.begin();
it != commands.end(); ++it)
openFile(output_dir/"command_"+(*it)+".html", PStream::raw_ascii, "w")
<< HelpSystem::helpOnCommandHTML(*it);
}


| void PLearn::HTMLHelpGenerator::helpFunctions | ( | ) |
Definition at line 80 of file HTMLHelpGenerator.cc.
References PLearn::HelpSystem::helpFunctionsHTML(), PLearn::openFile(), output_dir, and PLearn::PStream::raw_ascii.
Referenced by run().
{
openFile(output_dir/"functions_index.html", PStream::raw_ascii, "w")
<< HelpSystem::helpFunctionsHTML();
}


| void PLearn::HTMLHelpGenerator::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Does the necessary operations to transform a shallow copy (this) into a deep copy by deep-copying all the members that need to be.
This needs to be overridden by every class that adds "complex" data members to the class, such as Vec, Mat, PP<Something>, etc. Typical implementation:
void CLASS_OF_THIS::makeDeepCopyFromShallowCopy(CopiesMap& copies) { inherited::makeDeepCopyFromShallowCopy(copies); deepCopyField(complex_data_member1, copies); deepCopyField(complex_data_member2, copies); ... }
| copies | A map used by the deep-copy mechanism to keep track of already-copied objects. |
Reimplemented from PLearn::Object.
Definition at line 103 of file HTMLHelpGenerator.cc.
References PLearn::Object::makeDeepCopyFromShallowCopy().
{
inherited::makeDeepCopyFromShallowCopy(copies);
}

| void PLearn::HTMLHelpGenerator::run | ( | ) | [virtual] |
Override this for runnable objects (default method issues a runtime error).
Runnable objects are objects that can be used as *THE* object of a .plearn script. The run() method specifies what they should do when executed.
Reimplemented from PLearn::Object.
Definition at line 60 of file HTMLHelpGenerator.cc.
References helpClasses(), helpCommands(), helpFunctions(), PLearn::HelpSystem::helpIndexHTML(), PLearn::openFile(), output_dir, and PLearn::PStream::raw_ascii.
{
openFile(output_dir/"index.html", PStream::raw_ascii, "w")
<< HelpSystem::helpIndexHTML();
helpCommands();
helpFunctions();
helpClasses();
}

Reimplemented from PLearn::Object.
Definition at line 90 of file HTMLHelpGenerator.h.
### declare public option fields (such as build options) here Start your comments with Doxygen-compatible comments such as //!
Directory where the .html files should be generated
Definition at line 68 of file HTMLHelpGenerator.h.
Referenced by build_(), declareOptions(), helpClasses(), helpCommands(), helpFunctions(), and run().
Directory for HTML resources (prologue, epilogue, index.html) e.g.
{PLEARNDIR}/python_modules/plearn/plide/resources
Definition at line 72 of file HTMLHelpGenerator.h.
Referenced by build_(), and declareOptions().
1.7.4