Scale Stack 0.3 Developer Documentation

scalestack::kernel::option Class Reference

#include <option.h>

Public Member Functions

 ~option ()
moduleget_module (void) const
const std::string & get_name (void) const
const std::string & get_help (void) const
const std::string & get_value_name (void) const
const std::string & get_default_value (void) const
const std::string & get_value (void) const
int get_int_value (void) const
size_t get_size_value (void) const
bool get_bool_value (void) const
std::vector< std::string > get_list_value (void) const
bool is_valid (void) const

Private Member Functions

 option (module &module, const std::string &name)
 option (const option &)
optionoperator= (const option &)
void _set_help (const std::string &help)
void _set_value_name (const std::string &value_name)
void _set_default_value (const std::string &default_value)
void _set_value (const std::string &value, bool overwrite)
void _set_valid (bool valid)
void _print_help (void)
void _print_config (void)

Private Attributes

bool _is_valid
bool _is_set
module_module
const std::string _name
std::string _help
std::string _value_name
std::string _default_value
std::string _value

Friends

class module

Detailed Description

This class represents a module option and provides various parsing methods for values.

Definition at line 44 of file option.h.


Constructor & Destructor Documentation

scalestack::kernel::option::~option (  ) 

Definition at line 44 of file option.cc.

scalestack::kernel::option::option ( module module,
const std::string &  name 
) [private]

Construct an option instance.

Parameters:
[in] module Module that created this option.
[in] name Name of option to create.

Definition at line 127 of file option.cc.

scalestack::kernel::option::option ( const option  )  [private]

Don't allow copying of objects.


Member Function Documentation

module & scalestack::kernel::option::get_module ( void   )  const

Get the module object this option belongs to.

Definition at line 48 of file option.cc.

const string & scalestack::kernel::option::get_name ( void   )  const

Get the name of the option.

Definition at line 53 of file option.cc.

const string & scalestack::kernel::option::get_help ( void   )  const

Get the help message of the option.

Definition at line 58 of file option.cc.

const string & scalestack::kernel::option::get_value_name ( void   )  const

Get the value name of the option.

Definition at line 63 of file option.cc.

const string & scalestack::kernel::option::get_default_value ( void   )  const

Get the default value of the option.

Definition at line 68 of file option.cc.

const string & scalestack::kernel::option::get_value ( void   )  const

Get the value of the option.

Definition at line 73 of file option.cc.

int scalestack::kernel::option::get_int_value ( void   )  const

Get the value of the option converted to a int.

Definition at line 78 of file option.cc.

size_t scalestack::kernel::option::get_size_value ( void   )  const

Get the value of the option converted to a size_t.

Definition at line 83 of file option.cc.

bool scalestack::kernel::option::get_bool_value ( void   )  const

Get the value of the option converted to a boolean.

Definition at line 88 of file option.cc.

vector< string > scalestack::kernel::option::get_list_value ( void   )  const

Get the value of the option converted to a list. The format of the list is comma seperated.

Definition at line 102 of file option.cc.

bool scalestack::kernel::option::is_valid ( void   )  const

Check to see if the associated module asked for this to be a valid option.

Definition at line 118 of file option.cc.

option& scalestack::kernel::option::operator= ( const option  )  [private]

Don't allow assignment of objects.

void scalestack::kernel::option::_set_help ( const std::string &  help  )  [private]

Set the help string of the option.

Definition at line 139 of file option.cc.

void scalestack::kernel::option::_set_value_name ( const std::string &  value_name  )  [private]

Set the value name of the option.

Definition at line 144 of file option.cc.

void scalestack::kernel::option::_set_default_value ( const std::string &  default_value  )  [private]

Set the default value of the option.

Definition at line 149 of file option.cc.

void scalestack::kernel::option::_set_value ( const std::string &  value,
bool  overwrite 
) [private]

Get the value of the option.

Definition at line 154 of file option.cc.

void scalestack::kernel::option::_set_valid ( bool  valid  )  [private]

Set whether this is a valid option or not.

Definition at line 163 of file option.cc.

void scalestack::kernel::option::_print_help ( void   )  [private]

Print a help message for this option.

Definition at line 168 of file option.cc.

void scalestack::kernel::option::_print_config ( void   )  [private]

Print the configuration line for this option.

Definition at line 178 of file option.cc.


Friends And Related Function Documentation

friend class module [friend]

Definition at line 181 of file option.h.


Field Documentation

Definition at line 172 of file option.h.

Definition at line 173 of file option.h.

Definition at line 174 of file option.h.

const std::string scalestack::kernel::option::_name [private]

Definition at line 175 of file option.h.

std::string scalestack::kernel::option::_help [private]

Definition at line 176 of file option.h.

Definition at line 177 of file option.h.

Definition at line 178 of file option.h.

std::string scalestack::kernel::option::_value [private]

Definition at line 179 of file option.h.


The documentation for this class was generated from the following files:
Generated on Thu Feb 17 13:10:22 2011 by  doxygen 1.6.3