|
Gaudi Framework, version v22r1 |
| Home | Generated: Mon Feb 28 2011 |
#include <Catalogue.h>

Public Member Functions | |
| PropertyEntry () | |
| Constructor. | |
| PropertyEntry (const std::string &name, const std::string &value) | |
| Constructor. | |
| PropertyEntry (const std::string &name, const std::vector< std::string > &value) | |
| Creator. | |
| PropertyEntry (const std::string &name, const std::string &value, const Position &pos) | |
| Constructor. | |
| PropertyEntry (const std::string &name, const std::vector< std::string > &value, const Position &pos) | |
| Creator. | |
| const std::string & | name (void) const |
| Name of property. | |
| void | setName (const std::string &name) |
| Set name. | |
| std::string | value (void) const |
| Value of property. | |
| Position | position (void) const |
| Property position. | |
| StatusCode | addValues (const std::vector< std::string > &values) |
| Add values to vector value. | |
| StatusCode | removeValues (const std::vector< std::string > &values, int &count) |
| Remove values from property value. | |
| StatusCode | clear (void) |
| Clear property vector value. | |
| StatusCode | removeEnv () |
| remove environment variables | |
Private Attributes | |
| std::string | m_name |
| std::vector< std::string > | m_value |
| Position | m_position |
| bool | m_isVector |
Definition at line 98 of file Catalogue.h.
| Gaudi::Parsers::PropertyEntry::PropertyEntry | ( | ) | [inline] |
| Gaudi::Parsers::PropertyEntry::PropertyEntry | ( | const std::string & | name, |
| const std::string & | value | ||
| ) |
Constructor.
| name | Name of property |
| value | String value of property. |
Definition at line 26 of file PropertyEntry.cpp.
{
m_name = name;
m_value.push_back(value);
m_isVector = false;
}
| Gaudi::Parsers::PropertyEntry::PropertyEntry | ( | const std::string & | name, |
| const std::vector< std::string > & | value | ||
| ) |
Creator.
| name | Name of property |
| value | Vector value of property |
Definition at line 42 of file PropertyEntry.cpp.
| Gaudi::Parsers::PropertyEntry::PropertyEntry | ( | const std::string & | name, |
| const std::string & | value, | ||
| const Position & | pos | ||
| ) |
Constructor.
| name | Name of property |
| value | String value of property. |
| pos | Property position in file |
Definition at line 60 of file PropertyEntry.cpp.
{
m_name = name;
m_value.push_back(value);
m_position = pos;
m_isVector = false;
}
| Gaudi::Parsers::PropertyEntry::PropertyEntry | ( | const std::string & | name, |
| const std::vector< std::string > & | value, | ||
| const Position & | pos | ||
| ) |
Creator.
| name | Name of property |
| value | Vector value of property |
| pos | Property position in file |
Definition at line 80 of file PropertyEntry.cpp.
{
m_name = name;
m_value = value;
m_position = pos;
m_isVector = true;
if ( 1 == m_value.size() && "" == m_value[0] ) { clear(); }
}
| StatusCode Gaudi::Parsers::PropertyEntry::addValues | ( | const std::vector< std::string > & | values ) |
Add values to vector value.
| values | Values to add |
Definition at line 125 of file PropertyEntry.cpp.
{
if(!m_isVector) return StatusCode::FAILURE;
for(std::vector<std::string>::const_iterator cur = values.begin();
cur!=values.end();cur++){
m_value.push_back(*cur);
}
return StatusCode::SUCCESS;
}
| StatusCode Gaudi::Parsers::PropertyEntry::clear | ( | void | ) |
Clear property vector value.
Definition at line 167 of file PropertyEntry.cpp.
{
if(!m_isVector) return StatusCode::FAILURE;
m_value.clear();
return StatusCode::SUCCESS;
}
| const std::string& Gaudi::Parsers::PropertyEntry::name | ( | void | ) | const [inline] |
Name of property.
Definition at line 134 of file Catalogue.h.
{return m_name;};
| Position Gaudi::Parsers::PropertyEntry::position | ( | void | ) | const [inline] |
| StatusCode Gaudi::Parsers::PropertyEntry::removeEnv | ( | ) |
remove environment variables
Definition at line 176 of file PropertyEntry.cpp.
{
for ( std::vector<std::string>::iterator item =
m_value.begin() ; m_value.end() != item ; ++item )
{ *item = Gaudi::Parsers::Utils::removeEnvironment ( *item ) ; }
return StatusCode::SUCCESS ;
}
| StatusCode Gaudi::Parsers::PropertyEntry::removeValues | ( | const std::vector< std::string > & | values, |
| int & | count | ||
| ) |
Remove values from property value.
| values | |
| count | Count of removed items |
Definition at line 145 of file PropertyEntry.cpp.
{
if(!m_isVector) return StatusCode::FAILURE;
for(std::vector<std::string>::const_iterator
cur = values.begin();cur!=values.end();cur++){
std::vector<std::string>::iterator item = std::find(m_value.begin(),
m_value.end(),*cur);
if(item!=m_value.end()){
m_value.erase(item);
count++;
}
}
return StatusCode::SUCCESS;
}
| void Gaudi::Parsers::PropertyEntry::setName | ( | const std::string & | name ) | [inline] |
| std::string Gaudi::Parsers::PropertyEntry::value | ( | void | ) | const |
Value of property.
Definition at line 96 of file PropertyEntry.cpp.
{
std::string result="";
if(m_isVector){
result = "[";
std::string delim="";
for(std::vector<std::string>::const_iterator cur=m_value.begin();
cur!=m_value.end();cur++){
result+=delim+*cur;
delim=",";
}
result+="]";
}else{
if(m_value.size()>0){
result = m_value[0];
}
}
return result;
}
bool Gaudi::Parsers::PropertyEntry::m_isVector [private] |
Definition at line 176 of file Catalogue.h.
std::string Gaudi::Parsers::PropertyEntry::m_name [private] |
Definition at line 173 of file Catalogue.h.
Position Gaudi::Parsers::PropertyEntry::m_position [private] |
Definition at line 175 of file Catalogue.h.
std::vector<std::string> Gaudi::Parsers::PropertyEntry::m_value [private] |
Definition at line 174 of file Catalogue.h.