CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::Properties Class Reference

#include <Properties.h>

List of all members.

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

Detailed Description

Definition at line 11 of file Properties.h.


Constructor & Destructor Documentation

ora::Properties::Properties ( )

Definition at line 3 of file Properties.cc.

ora::Properties::~Properties ( ) [virtual]

Definition at line 6 of file Properties.cc.

                          {
}

Member Function Documentation

bool ora::Properties::getFlag ( const std::string &  flagName) const

Definition at line 36 of file Properties.cc.

References run_regression::ret.

                                                           {
  bool ret = false;
  if(m_flags.find(flagName)!=m_flags.end()){
    ret = true;
  }
  return ret;
}
std::string ora::Properties::getProperty ( const std::string &  propertyName) const

Definition at line 27 of file Properties.cc.

References run_regression::ret, and AlCaHLTBitMon_QueryRunRegistry::string.

                                                                        {
  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 run_regression::ret.

                                                       {
  bool ret = false;
  if(m_flags.find(flagName)!=m_flags.end()){
    ret = true;
    m_flags.erase(flagName);
  }
  return ret;
}
bool ora::Properties::removeProperty ( const std::string &  propertyName)

Definition at line 44 of file Properties.cc.

References run_regression::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 run_regression::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;
}

Member Data Documentation

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.