description
More...
#include <MiniConfig.h>
description
- Author
- Michael Wilson, CERN, March 2007
Definition at line 25 of file MiniConfig.h.
◆ KeyIter_t
◆ KeySet_t
◆ MiniConfig()
dqi::MiniConfig::MiniConfig |
( |
| ) |
|
◆ ~MiniConfig()
dqi::MiniConfig::~MiniConfig |
( |
| ) |
|
|
virtual |
◆ AddAttributeKeyword()
void dqi::MiniConfig::AddAttributeKeyword |
( |
std::string |
keyword_ | ) |
|
|
virtual |
Definition at line 57 of file MiniConfig.cxx.
60 const KeySet_t::value_type& keyval( std::move(keyword_) );
◆ AddKeyword()
void dqi::MiniConfig::AddKeyword |
( |
std::string |
keyword_ | ) |
|
|
virtual |
Definition at line 48 of file MiniConfig.cxx.
51 const KeySet_t::value_type& keyval( std::move(keyword_) );
◆ GetAttributeNames()
void dqi::MiniConfig::GetAttributeNames |
( |
std::string |
objName, |
|
|
std::set< std::string > & |
attSet |
|
) |
| const |
|
virtual |
Definition at line 296 of file MiniConfig.cxx.
302 std::cerr <<
"MiniConfig::GetAttributeNames(): "
303 <<
"not configured (no file has been read)\n";
309 std::cerr <<
"MiniConfig::GetAttributeNames(): "
310 <<
"\"" << objName <<
"\" does not exist\n";
314 node->GetAttributeNames( attSet );
◆ GetFloatAttribute()
float dqi::MiniConfig::GetFloatAttribute |
( |
std::string |
objName, |
|
|
std::string |
attName |
|
) |
| const |
|
virtual |
Definition at line 265 of file MiniConfig.cxx.
269 std::cerr <<
"MiniConfig::GetFloatAttribute(): "
270 <<
"not configured (no file has been read)\n";
276 std::cerr <<
"MiniConfig::GetFloatAttribute(): "
277 <<
"\"" << objName <<
"\" does not exist\n";
282 std::string valstring =
node->GetAttribute( attName );
283 std::istringstream valstream(valstring);
286 std::cerr <<
"MiniConfig::GetFloatAttribute(): object \"" << objName <<
"\""
287 <<
": \"" << attName <<
"\" not a floating-point type\n";
◆ GetIntAttribute()
int dqi::MiniConfig::GetIntAttribute |
( |
std::string |
objName, |
|
|
std::string |
attName |
|
) |
| const |
|
virtual |
Definition at line 234 of file MiniConfig.cxx.
238 std::cerr <<
"MiniConfig::GetIntAttribute(): "
239 <<
"not configured (no file has been read)\n";
245 std::cerr <<
"MiniConfig::GetIntAttribute(): "
246 <<
"\"" << objName <<
"\" does not exist\n";
251 std::string valstring =
node->GetAttribute( attName );
252 std::istringstream valstream(valstring);
255 std::cerr <<
"MiniConfig::GetIntAttribute(): "
256 <<
"\"" << attName <<
"\" not an integer type\n";
◆ GetStringAttribute()
std::string dqi::MiniConfig::GetStringAttribute |
( |
std::string |
objName, |
|
|
std::string |
attName |
|
) |
| const |
|
virtual |
Definition at line 214 of file MiniConfig.cxx.
218 std::cerr <<
"MiniConfig::GetStringAttribute(): "
219 <<
"not configured (no file has been read)\n";
220 return std::string(
"");
225 std::cerr <<
"MiniConfig::GetStringAttribute(): "
226 <<
"\"" << objName <<
"\" does not exist\n";
227 return std::string(
"");
229 return node->GetAttribute( std::move(attName) );
◆ ReadFile()
bool dqi::MiniConfig::ReadFile |
( |
std::string |
fileName | ) |
|
|
virtual |
Definition at line 72 of file MiniConfig.cxx.
78 m_tree =
new MiniConfigTreeNode(
"global", 0 );
84 std::cerr <<
"MiniConfig::ReadFile(): "
85 <<
"cannot read from file: " <<
fileName <<
"\n";
101 std::istringstream linestream(
line);
104 while( linestream.get(
c) ) {
112 if(
c == 0 || isspace(
c) ) {
121 linestream.putback(
c);
126 std::cerr <<
"MiniConfig::ReadFile(): "
127 <<
"badly formatted line: \"" <<
line <<
"\", line number " << lineNumber <<
"\n";
132 if( skipCount > 0 ) {
138 std::cerr <<
"MiniConfig::ReadFile(): "
139 <<
"unmatched \"}\", line number " << lineNumber <<
"\n";
151 std::cerr <<
"MiniConfig::ReadFile(): "
152 <<
"badly formatted line: \"" <<
line <<
"\", line number " << lineNumber <<
"\n";
157 val =
line.substr(linestream.tellg(), std::string::npos);
160 if(
val.size() == 0 ) {
161 std::cerr <<
"MiniConfig::ReadFile(): "
162 <<
"badly formatted line: \"" <<
line <<
"\", line number " << lineNumber <<
"\n";
166 if( skipCount == 0 ) {
167 node->SetAttribute( att,
val,
false );
178 std::string lokey =
key;
179 boost::algorithm::to_lower (lokey);
183 std::cerr <<
"MiniConfig::ReadFile(): "
184 <<
"badly formatted line: \"" <<
line <<
"\", line number " << lineNumber <<
"\n";
195 node->SetAttribute(
id,
node->GetPathName(),
true );
204 std::cerr <<
"MiniConfig::ReadFile(): "
205 <<
"badly formatted line: \"" <<
line <<
"\", line number " << lineNumber <<
"\n";
◆ SendVisitor()
Definition at line 319 of file MiniConfig.cxx.
323 std::cerr <<
"MiniConfig::SendVisitor(): "
324 <<
"not configured (no file has been read)\n";
◆ SendWriter()
Definition at line 331 of file MiniConfig.cxx.
335 std::cerr <<
"MiniConfig::SendWriter(): "
336 <<
"not configured (no file has been read)\n";
◆ SetAttribKeywordPropagateDown()
void dqi::MiniConfig::SetAttribKeywordPropagateDown |
( |
bool |
propagateDown | ) |
|
|
virtual |
◆ m_attKeywords
◆ m_keywords
◆ m_propagateDown
bool dqi::MiniConfig::m_propagateDown |
|
protected |
◆ m_tree
The documentation for this class was generated from the following files: