ATLAS Offline Software
|
Internal class keeping track of a single variable. More...
#include <ObjectMetadata.h>
Public Member Functions | |
Variable () | |
Default constructor. More... | |
const std::string & | type () const |
Type name of the variable. More... | |
const std::string & | name () const |
Name of the variable without its prefix. More... | |
const std::string & | doc () const |
Description of the variable. More... | |
bool | primitive () const |
Flag showing whether the variable is a primitive. More... | |
void | setType (const std::string &type) |
Set the type name of the variable. More... | |
void | setName (const std::string &name) |
Set the name of the variable. More... | |
void | setDoc (const std::string &doc) |
Set the description of the variable. More... | |
void | setPrimitive (bool primitive) |
Set whether the variable is a primitive. More... | |
std::string | toString () const |
Function "serializing" the variable information into a string. More... | |
StatusCode | read (const std::string &data) |
Read data from a "serialized" string. More... | |
bool | operator== (const Variable &var) const |
Operator checking the equivalence of two variables. More... | |
bool | operator< (const Variable &var) const |
Operator needed to use such objects in STL containers. More... | |
Static Public Attributes | |
static const char *const | STRING_SEPARATOR = "$" |
Character separating parts of the variable's metadata. More... | |
Private Attributes | |
std::string | m_type |
Full type name of the variable. More... | |
std::string | m_name |
Name of the variable without its prefix. More... | |
std::string | m_doc |
Description of the variable. More... | |
bool | m_primitive |
Flag showing whether the variable is a primitive. More... | |
Internal class keeping track of a single variable.
This class is used internally by the class to keep all the important properties of a D3PD variable. It is mainly used by the D3PDReader project to store and retrieve information about the D3PDObject-s that produced a D3PD.
Definition at line 131 of file ObjectMetadata.h.
D3PD::ObjectMetadata::Variable::Variable | ( | ) |
Default constructor.
Definition at line 422 of file ObjectMetadata.cxx.
const std::string & D3PD::ObjectMetadata::Variable::doc | ( | ) | const |
Description of the variable.
Definition at line 437 of file ObjectMetadata.cxx.
const std::string & D3PD::ObjectMetadata::Variable::name | ( | ) | const |
Name of the variable without its prefix.
Definition at line 432 of file ObjectMetadata.cxx.
bool D3PD::ObjectMetadata::Variable::primitive | ( | ) | const |
Flag showing whether the variable is a primitive.
Definition at line 442 of file ObjectMetadata.cxx.
StatusCode D3PD::ObjectMetadata::Variable::read | ( | const std::string & | data | ) |
Read data from a "serialized" string.
This function can be used to read in information from a serialized form.
Note that the function is meant to reset all stored properties of the object. (Unlike the function in D3PD::ObjectMetadata!) This is just because merging doesn't make sense for this class.
data | The string that should be decoded |
StatusCode::SUCCESS
if the operation was successful, StatusCode::FAILURE
otherwise Definition at line 495 of file ObjectMetadata.cxx.
void D3PD::ObjectMetadata::Variable::setDoc | ( | const std::string & | doc | ) |
Set the description of the variable.
Definition at line 459 of file ObjectMetadata.cxx.
void D3PD::ObjectMetadata::Variable::setName | ( | const std::string & | name | ) |
Set the name of the variable.
Definition at line 453 of file ObjectMetadata.cxx.
void D3PD::ObjectMetadata::Variable::setPrimitive | ( | bool | primitive | ) |
Set whether the variable is a primitive.
Definition at line 465 of file ObjectMetadata.cxx.
void D3PD::ObjectMetadata::Variable::setType | ( | const std::string & | type | ) |
Set the type name of the variable.
Definition at line 447 of file ObjectMetadata.cxx.
std::string D3PD::ObjectMetadata::Variable::toString | ( | ) | const |
Function "serializing" the variable information into a string.
This function translates the contents of the variable into a single string.
The different parts of the configuration string are separated by "$" character. (So variable names and variable descriptions can't have this character in them.)
Definition at line 479 of file ObjectMetadata.cxx.
const std::string & D3PD::ObjectMetadata::Variable::type | ( | ) | const |
Type name of the variable.
Definition at line 427 of file ObjectMetadata.cxx.
|
private |
Description of the variable.
Definition at line 164 of file ObjectMetadata.h.
|
private |
Name of the variable without its prefix.
Definition at line 163 of file ObjectMetadata.h.
|
private |
Flag showing whether the variable is a primitive.
Definition at line 165 of file ObjectMetadata.h.
|
private |
Full type name of the variable.
Definition at line 162 of file ObjectMetadata.h.
Character separating parts of the variable's metadata.
Definition at line 160 of file ObjectMetadata.h.