IDFstepper
IDF to STEP converter
Classes | Typedefs | Functions
config Namespace Reference

Classes

struct  ConfigGrammar
 This is the Qi grammar to parse config files into Config vectors. More...

Typedefs

typedef boost::variant< bool,
double, std::string > 
Value
 Type representing the value of a config option.
typedef std::vector< std::pair
< std::string, Value > > 
Config
 Type representing the contents of a config file.

Functions

bool parseConfig (std::string::const_iterator &iter, std::string::const_iterator end, Config &conf)
 Parses a stream of characters into a map of key/value pairs.

Typedef Documentation

typedef std::vector<std::pair<std::string, Value> > config::Config

Type representing the contents of a config file.

Definition at line 18 of file ConfigType.hpp.

typedef boost::variant<bool, double, std::string> config::Value

Type representing the value of a config option.

Definition at line 13 of file ConfigType.hpp.


Function Documentation

bool config::parseConfig ( std::string::const_iterator &  iter,
std::string::const_iterator  end,
Config &  conf 
)

Parses a stream of characters into a map of key/value pairs.

The values can be of various types, which is adressed by the use of boost::variant as the map's value type.

Parameters:
iterIterator to first character to parse. This will be positioned to one past the last analyzed character at function return. All data has been parsed if iter == end after return.
endIterator to one-past-end element.
confConfig map to be filled.
Returns:
True if the data could be parsed (not necessarily *all* data), false otherwise.

Definition at line 8 of file ConfigParser.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines