Classes | |
class | CommandLine |
This class parses the command line arguments of a C/C++ program. More... | |
class | CommandLine::Option |
An option that is either supplied or not. More... | |
class | CommandLine::Parameter |
A parameter that has a default value and may be overridden on the command line. More... | |
class | CommandLine::MultiParameter |
A parameter that has can be specified multiple times on the command line. More... | |
class | Random |
A simple wrapper around the GNU Scientific Library pseudorandom number generator. More... | |
Typedefs | |
typedef std::map< std::string, std::string > | PropertyMap |
A property map is a map from property names to values (both of which are represented by strings). | |
Functions | |
const std::string & | getp (const PropertyMap &props, const std::string &name) throw (std::invalid_argument) |
Gets the value of the property. | |
bool | hasp (const PropertyMap &props, const std::string &name) |
Determines if a property has been assigned a value. | |
template<typename charT, typename traits> std::basic_istream< charT, traits > & | operator>> (std::basic_istream< charT, traits > &in, PropertyMap &pm) |
Reads a property map from an input stream. | |
template<typename charT, typename traits> std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &out, const PropertyMap &pm) |
Writes a property map to an output stream. | |
template<typename T> bool | parse (const std::string &str, T &value) |
Parses a value from a string using its stream input operator. | |
Variables | |
Random | default_random |
A default source of randomness, initialized using environment variables. |
|
|
Gets the value of the property.
Definition at line 25 of file properties.hpp. References PropertyMap. |
|
Determines if a property has been assigned a value.
Definition at line 40 of file properties.hpp. References PropertyMap. |
|
Writes a property map to an output stream.
Definition at line 113 of file properties.hpp. References PropertyMap. |
|
Reads a property map from an input stream. If the read is not successful then the std::ios_base::failbit is set in the input stream. The input stream must consist of assignments of the form 'name = value' (whitespace unimportant), possibly with comments that start with '#' and continue to the next newline. If the same name is specified multiple times then the last value is stored. Properties in the supplied map are overwritten if they are specified in the stream.
Definition at line 61 of file properties.hpp. References PropertyMap, and Arak::skipcomments(). |
|
Parses a value from a string using its stream input operator.
Definition at line 139 of file properties.hpp. |
|
A default source of randomness, initialized using environment variables.
Definition at line 5 of file random.cpp. |