PetaVision  Alpha
PV::Configuration Class Reference

Data Structures

struct  IntOptional
 

Public Types

enum  ConfigurationType {
  CONFIG_UNRECOGNIZED, CONFIG_BOOL, CONFIG_INT, CONFIG_UNSIGNED,
  CONFIG_STRING, CONFIG_INT_OPTIONAL
}
 

Public Member Functions

bool const & getBooleanArgument (std::string const &name) const
 
int const & getIntegerArgument (std::string const &name) const
 
IntOptional const & getIntOptionalArgument (std::string const &name) const
 
std::string const & getStringArgument (std::string const &name) const
 
ConfigurationType getType (std::string const &name) const
 
unsigned int const & getUnsignedIntArgument (std::string const &name) const
 
std::string printArgument (std::string const &name) const
 
std::string printConfig () const
 
bool setArgumentUsingString (std::string const &name, std::string const &value)
 
bool setBooleanArgument (std::string const &name, bool const &value)
 
bool setIntegerArgument (std::string const &name, int const &value)
 
bool setIntOptionalArgument (std::string const &name, IntOptional const &value)
 
bool setStringArgument (std::string const &name, std::string const &value)
 
bool setUnsignedIntArgument (std::string const &name, unsigned int const &value)
 

Static Public Member Functions

static std::string printBooleanArgument (std::string const &name, bool const &value)
 
static std::string printIntegerArgument (std::string const &name, int const &value)
 
static std::string printIntOptionalArgument (std::string const &name, IntOptional const &value)
 
static std::string printStringArgument (std::string const &name, std::string const &value)
 
static std::string printUnsignedArgument (std::string const &name, unsigned int const &value)
 

Private Member Functions

bool parseBoolean (std::string const &valueString) const
 
int parseInteger (std::string const &valueString) const
 
IntOptional parseIntOptional (std::string const &valueString) const
 
std::string parseString (std::string const &valueString) const
 
unsigned int parseUnsignedInt (std::string const &valueString) const
 
void registerArgument (std::string const &name, ConfigurationType type)
 
void registerBooleanArgument (std::string const &name)
 
void registerIntegerArgument (std::string const &name)
 
void registerIntOptionalArgument (std::string const &name)
 
void registerStringArgument (std::string const &name)
 
void registerUnsignedIntArgument (std::string const &name)
 

Private Attributes

std::map< std::string, bool > mBooleanConfigMap
 
std::vector< std::string > mConfigArguments
 
std::map< std::string, ConfigurationType > mConfigTypeMap
 
std::map< std::string, int > mIntegerConfigMap
 
std::map< std::string, IntOptionalmIntOptionalConfigMap
 
std::map< std::string, std::string > mStringConfigMap
 
std::map< std::string, unsigned int > mUnsignedIntConfigMap
 

Detailed Description

Definition at line 10 of file Configuration.hpp.

Member Function Documentation

Configuration::ConfigurationType PV::Configuration::getType ( std::string const &  name) const

Returns the type for the given string: unrecognized, boolean, integer, unsigned, string, or optional integer.

Definition at line 77 of file Configuration.cpp.


The documentation for this class was generated from the following files: