Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

toxic::CLParser Class Reference

#include <clparser.h>

Inheritance diagram for toxic::CLParser:

sheep::CommandLineParser< CLParser > List of all members.

Public Member Functions

 CLParser (DriverSettings *driver_settings)
void Parse (int argc, char **argv)
 Parses the command line. Stops program execution on failure.


Private Member Functions

void print_usage () const
void filename_handler (const std::string &filename)
void opt_output (const std::string &filename)
void opt_width (int width)
void opt_height (int height)
void opt_save_gpm (const std::string &filename)
void opt_load_gpm (const std::string &filename)
void opt_save_cpm (const std::string &filename)
void opt_load_cpm (const std::string &filename)
void opt_driver_settings (const std::string &filename)
void opt_scene_settings (const std::string &filename)
void opt_skip_render ()
void opt_help ()

Private Attributes

DriverSettingsm_driver_settings
 The DriverSettings class to which the class is binded.

std::string m_progname
 m_progname = argv[0].


Constructor & Destructor Documentation

CLParser::CLParser DriverSettings driver_settings  ) 
 

The constructor binds the class to an instance of the DriverSettings class. Ownership of the DriverSettings instance remains to the caller.

Definition at line 36 of file clparser.cpp.

References sheep::CommandLineParser< CLParser >::EnableFilenameExtraction(), m_driver_settings, and sheep::CommandLineParser< CLParser >::RegisterOption().


Member Function Documentation

void CLParser::filename_handler const std::string &  filename  )  [private]
 

Definition at line 129 of file clparser.cpp.

References m_driver_settings, toxic::DriverSettings::m_input_files, toxic::DriverSettings::InputFiles::m_scene_file, toxic::DriverSettings::SettingsFiles::m_scene_settings_file, and toxic::DriverSettings::m_settings_files.

void CLParser::opt_driver_settings const std::string &  filename  )  [private]
 

Definition at line 185 of file clparser.cpp.

References m_driver_settings, toxic::DriverSettings::SettingsFiles::m_driver_settings_file, and toxic::DriverSettings::m_settings_files.

void CLParser::opt_height int  height  )  [private]
 

Definition at line 150 of file clparser.cpp.

References sheep::CommandLineParser< CLParser >::GetCurrentOptionName(), m_driver_settings, toxic::DriverSettings::PrimaryOutput::m_height, and toxic::DriverSettings::m_primary_output.

void CLParser::opt_help  )  [private]
 

Definition at line 197 of file clparser.cpp.

References print_usage().

void CLParser::opt_load_cpm const std::string &  filename  )  [private]
 

Definition at line 179 of file clparser.cpp.

References toxic::DriverSettings::m_caustics_photon_map, m_driver_settings, toxic::DriverSettings::CausticsPhotonMap::m_file, and toxic::DriverSettings::CausticsPhotonMap::m_op.

void CLParser::opt_load_gpm const std::string &  filename  )  [private]
 

Definition at line 167 of file clparser.cpp.

References m_driver_settings, toxic::DriverSettings::GlobalPhotonMap::m_file, toxic::DriverSettings::m_global_photon_map, and toxic::DriverSettings::GlobalPhotonMap::m_op.

void CLParser::opt_output const std::string &  filename  )  [private]
 

Definition at line 135 of file clparser.cpp.

References m_driver_settings, toxic::DriverSettings::PrimaryOutput::m_file, and toxic::DriverSettings::m_primary_output.

void CLParser::opt_save_cpm const std::string &  filename  )  [private]
 

Definition at line 173 of file clparser.cpp.

References toxic::DriverSettings::m_caustics_photon_map, m_driver_settings, toxic::DriverSettings::CausticsPhotonMap::m_file, and toxic::DriverSettings::CausticsPhotonMap::m_op.

void CLParser::opt_save_gpm const std::string &  filename  )  [private]
 

Definition at line 161 of file clparser.cpp.

References m_driver_settings, toxic::DriverSettings::GlobalPhotonMap::m_file, toxic::DriverSettings::m_global_photon_map, and toxic::DriverSettings::GlobalPhotonMap::m_op.

void CLParser::opt_scene_settings const std::string &  filename  )  [private]
 

Definition at line 189 of file clparser.cpp.

References m_driver_settings, toxic::DriverSettings::SettingsFiles::m_scene_settings_file, and toxic::DriverSettings::m_settings_files.

void CLParser::opt_skip_render  )  [private]
 

Definition at line 193 of file clparser.cpp.

References m_driver_settings, toxic::DriverSettings::PrimaryOutput::m_enabled, and toxic::DriverSettings::m_primary_output.

void CLParser::opt_width int  width  )  [private]
 

Definition at line 139 of file clparser.cpp.

References sheep::CommandLineParser< CLParser >::GetCurrentOptionName(), m_driver_settings, toxic::DriverSettings::m_primary_output, and toxic::DriverSettings::PrimaryOutput::m_width.

void CLParser::Parse int  argc,
char **  argv
 

Parses the command line. Stops program execution on failure.

Reimplemented from sheep::CommandLineParser< CLParser >.

Definition at line 70 of file clparser.cpp.

References toxic::Error(), m_progname, and print_usage().

void CLParser::print_usage  )  const [private]
 

Definition at line 101 of file clparser.cpp.

References m_progname.

Referenced by opt_help(), and Parse().


Member Data Documentation

DriverSettings* toxic::CLParser::m_driver_settings [private]
 

The DriverSettings class to which the class is binded.

Definition at line 45 of file clparser.h.

Referenced by CLParser(), filename_handler(), opt_driver_settings(), opt_height(), opt_load_cpm(), opt_load_gpm(), opt_output(), opt_save_cpm(), opt_save_gpm(), opt_scene_settings(), opt_skip_render(), and opt_width().

std::string toxic::CLParser::m_progname [private]
 

m_progname = argv[0].

Definition at line 46 of file clparser.h.

Referenced by Parse(), and print_usage().


The documentation for this class was generated from the following files:
Generated on Tue May 11 01:31:56 2004 for toxic by doxygen 1.3.6