#include <Properties.h>
Public Member Functions | |
bool | getFlag (const std::string &flagName) const |
std::string | getProperty (const std::string &propertyName) const |
bool | hasProperty (const std::string &propertyName) const |
Properties () | |
bool | removeFlag (const std::string &flagName) |
bool | removeProperty (const std::string &propertyName) |
void | setFlag (const std::string &flagName) |
bool | setProperty (const std::string &propertyName, const std::string &propertyValue) |
virtual | ~Properties () |
Private Attributes | |
std::set< std::string > | m_flags |
std::map< std::string, std::string > | m_properties |
Definition at line 11 of file Properties.h.
ora::Properties::Properties | ( | ) |
Definition at line 3 of file Properties.cc.
:m_properties(),m_flags(){ }
ora::Properties::~Properties | ( | ) | [virtual] |
Definition at line 6 of file Properties.cc.
{ }
bool ora::Properties::getFlag | ( | const std::string & | flagName | ) | const |
Definition at line 36 of file Properties.cc.
References runTheMatrix::ret.
std::string ora::Properties::getProperty | ( | const std::string & | propertyName | ) | const |
Definition at line 27 of file Properties.cc.
References runTheMatrix::ret.
{ std::string ret(""); std::map<std::string,std::string>::const_iterator iP = m_properties.find(propertyName); if(iP!=m_properties.end()){ ret = iP->second; } return ret; }
bool ora::Properties::hasProperty | ( | const std::string & | propertyName | ) | const |
Definition at line 23 of file Properties.cc.
{ return (m_properties.find(propertyName)!=m_properties.end()); }
bool ora::Properties::removeFlag | ( | const std::string & | flagName | ) |
Definition at line 53 of file Properties.cc.
References runTheMatrix::ret.
bool ora::Properties::removeProperty | ( | const std::string & | propertyName | ) |
Definition at line 44 of file Properties.cc.
References runTheMatrix::ret.
{ bool ret = false; if(m_properties.find(propertyName)!=m_properties.end()){ ret = true; m_properties.erase(propertyName); } return ret; }
void ora::Properties::setFlag | ( | const std::string & | flagName | ) |
Definition at line 19 of file Properties.cc.
{ m_flags.insert(flagName); }
bool ora::Properties::setProperty | ( | const std::string & | propertyName, |
const std::string & | propertyValue | ||
) |
Definition at line 9 of file Properties.cc.
References runTheMatrix::ret.
{ bool ret = false; if(m_properties.find(propertyName)!=m_properties.end()){ ret = true; m_properties.erase(propertyName); } m_properties.insert(std::make_pair(propertyName,propertyValue)); return ret; }
std::set<std::string> ora::Properties::m_flags [private] |
Definition at line 28 of file Properties.h.
std::map<std::string,std::string> ora::Properties::m_properties [private] |
Definition at line 27 of file Properties.h.