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

The first sentence should be a BRIEF DESCRIPTION of what the class does. More...

#include <HTMLHelpGenerator.h>

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

List of all members.

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 OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual HTMLHelpGeneratordeepCopy (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 PPathdeclaringFile ()

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.

Detailed Description

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

Todo:
Write class to-do's here if there are any.
Deprecated:
Write deprecated stuff here if there is any. Indicate what else should be used instead.

Definition at line 57 of file HTMLHelpGenerator.h.


Member Typedef Documentation

Reimplemented from PLearn::Object.

Definition at line 59 of file HTMLHelpGenerator.h.


Constructor & Destructor Documentation

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_)
{}

Member Function Documentation

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.

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

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_().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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);
}

Here is the call graph for this function:

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);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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();
}

Here is the call graph for this function:

Here is the caller graph for this function:

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);
      ...
  }
Parameters:
copiesA 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().

Here is the call graph for this function:

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.

Here is the call graph for this function:


Member Data Documentation

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().


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