Go to the documentation of this file.
34 #ifndef TTA_CONFIGURATION_FILE_HH
35 #define TTA_CONFIGURATION_FILE_HH
55 void load(std::istream& inputStream);
57 bool hasKey(
const std::string& key);
58 std::string
value(
const std::string& key,
int index = 0);
62 int intValue(
const std::string& key,
int index = 0);
63 float floatValue(
const std::string& key,
int index = 0);
64 std::string
stringValue(
const std::string& key,
int index = 0);
65 bool booleanValue(
const std::string& key,
int index = 0);
93 const std::string& key,
95 bool caseSensitive =
false);
100 const std::string& line);
104 typedef std::map<TCEString, std::vector<TCEString> >
ValueContainer;
109 void parse(std::istream& inputStream);
111 const std::string& key,
112 const std::string&
value,
114 const std::string& line);
117 std::string
valueOfKey(
const std::string& key,
int index);
bool caseSensitive_
True if name is case sensitive.
ConfigurationFile(bool doChecking=false)
bool booleanValue(const std::string &key, int index=0)
int itemCount(const std::string &key)
virtual bool handleError(int lineNumber, ConfigurationFileError error, const std::string &line)
void parse(std::istream &inputStream)
float floatValue(const std::string &key, int index=0)
@ VT_UNIX_TIMESTAMP
Time as seconds since starting of 1970.
@ VT_INTEGER
Integer value.
ValueContainer values_
Contains all the values of configuration file.
bool check_
True if semantics of the configuration file is checked.
@ FE_UNKNOWN_KEY
Unknown key error.
bool isComment(const std::string &line)
std::string value(const std::string &key, int index=0)
std::string name_
Name of the key.
bool legalTime(const std::string &line)
@ VT_BOOLEAN
Boolean value.
virtual ~ConfigurationFile()
std::map< TCEString, std::vector< TCEString > > ValueContainer
KeyContainer keys_
Contains all the legal keys of the configuration file.
bool checkSemantics(const std::string &key, const std::string &value, int lineNumber, const std::string &line)
@ FE_ILLEGAL_TYPE
Illegal type error.
void load(std::istream &inputStream)
find Finds info of the inner loops in the false
int intValue(const std::string &key, int index=0)
unsigned int timeStampValue(const std::string &key)
bool hasKey(const std::string &key)
void addSupportedKey(const std::string &key, ConfigurationValueType type, bool caseSensitive=false)
std::string stringValue(const std::string &key, int index=0)
@ FE_MISSING_VALUE
Missing value error.
std::string valueOfKey(const std::string &key, int index)
std::map< Key *, ConfigurationValueType > KeyContainer
@ VT_READABLE_TIME
Time in readable format.