VisualizeArguments Class Reference

Command-line arguments parser for visualize binary. More...

#include <VisualizeArguments.h>

Inheritance diagram for VisualizeArguments:

Inheritance graph
[legend]
Collaboration diagram for VisualizeArguments:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< std::string > StringContainer

Public Member Functions

 VisualizeArguments ()
virtual ~VisualizeArguments ()
char * getFileIn ()
bool getScreenshot ()
char * getScreenshotFile ()
bool parseArguments (int argc, char **argv)
char * getCstringValue (std::string name)
void setDescription (const char *description)
void setVersion (const char *version)
template<class T>
getValue (std::string name)
void clean ()

Static Public Attributes

static const char * NAMES []

Protected Member Functions

virtual void showHelp (bool quit=true, const char *custMessage=0)
void showError (StringContainer parts)
void showError (const char *message)
void showVersion (bool quit=false)
void setDelimiter (const char *new_var)
char * getDelimiter ()
void addArgument (const char *name, const char *description, bool required, const char *def)

Detailed Description

Command-line arguments parser for visualize binary.

Definition at line 17 of file VisualizeArguments.h.


Member Typedef Documentation

typedef std::vector<std::string> ArgumentParser::StringContainer [inherited]

Definition at line 25 of file ArgumentParser.h.


Constructor & Destructor Documentation

VisualizeArguments::VisualizeArguments (  ) 

Empty Constructor

virtual VisualizeArguments::~VisualizeArguments (  )  [virtual]

Empty Destructor


Member Function Documentation

char* VisualizeArguments::getFileIn (  ) 

Returns:
char*

bool VisualizeArguments::getScreenshot (  ) 

Returns:
char*

char* VisualizeArguments::getScreenshotFile (  ) 

Returns:
char*

bool ArgumentParser::parseArguments ( int  argc,
char **  argv 
) [inherited]

Parse command line arguments

Returns:
bool
Parameters:
argc Argument count
argv Array of arguments.

char* ArgumentParser::getCstringValue ( std::string  name  )  [inherited]

Return char*

Returns:
char*
Parameters:
name Argument name

void ArgumentParser::setDescription ( const char *  description  )  [inherited]

Set program description

Parameters:
description Program description

void ArgumentParser::setVersion ( const char *  version  )  [inherited]

Set program version

Parameters:
version String describing program version

template<class T>
T ArgumentParser::getValue ( std::string  name  )  [inline, inherited]

Template for prasing cstrings.

Returns:
T
Parameters:
name Argument name.

Definition at line 69 of file ArgumentParser.h.

References ArgumentParser::showHelp().

void ArgumentParser::clean (  )  [inherited]

Free malloced memory.

virtual void ArgumentParser::showHelp ( bool  quit = true,
const char *  custMessage = 0 
) [protected, virtual, inherited]

Show help

Parameters:
quit if is true then function call exit(0) on end
custMessage Custom message to show on the top of help

Referenced by ArgumentParser::getValue().

void ArgumentParser::showError ( StringContainer  parts  )  [protected, inherited]

Show help message and quit

Parameters:
parts vector containing parts of error message

void ArgumentParser::showError ( const char *  message  )  [protected, inherited]

Show help message and quit

Parameters:
message error message

void ArgumentParser::showVersion ( bool  quit = false  )  [protected, inherited]

Show version

Parameters:
quit if is true then function call exit(1) on end

void ArgumentParser::setDelimiter ( const char *  new_var  )  [protected, inherited]

Set the value of delimiter_ Arguments delimiter.

Parameters:
new_var the new value of m_delimiter_

char* ArgumentParser::getDelimiter (  )  [protected, inherited]

Get the value of delimiter_ Arguments delimiter.

Returns:
the value of m_delimiter_

void ArgumentParser::addArgument ( const char *  name,
const char *  description,
bool  required,
const char *  def 
) [protected, inherited]

Add argument

Parameters:
name Argument name
description Argument description
required True if argument is required
def Default value like cstring ( char* )


Member Data Documentation

const char* VisualizeArguments::NAMES[] [static]

Definition at line 31 of file VisualizeArguments.h.


The documentation for this class was generated from the following file:
Generated on Thu Dec 6 19:33:12 2007 for Radiosity Renderer and Visualizer by  doxygen 1.5.2