ATLAS Offline Software
Classes | Public Member Functions | Public Attributes | List of all members
pool::DbOption Class Reference

#include <StorageSvc/DbOption.h>

Collaboration diagram for pool::DbOption:

Classes

union  Value
 

Public Member Functions

DbStatus i_setValue (const std::type_info &typ, const void *value)
 Set the option value. More...
 
DbStatus i_getValue (const std::type_info &typ, void *value) const
 Set the option value. More...
 
template<class T >
 DbOption (const std::string &nam, const std::string &opt, T value)
 Initializing constructor. More...
 
 DbOption (const std::string &nam, const std::string &opt="")
 Initializing constructor with type definition. More...
 
virtual ~DbOption ()
 Default copy constructor Standard destructor. More...
 
const std::string & option () const
 Access to column name. More...
 
const std::string & name () const
 Access to column name. More...
 
DbColumn::Type type () const
 Integer type identifier. More...
 
template<class T >
DbStatus _setValue (T value)
 Set the option value. More...
 
template<class T >
DbStatus _getValue (T &value) const
 Set the option value. More...
 
std::string typeName () const
 Access to OS independent type name. More...
 
DbStatus setValue (DbColumn::Type typ, const void *value)
 Set the option value. More...
 
DbStatus getValue (DbColumn::Type typ, void *value) const
 Set the option value. More...
 

Public Attributes

Value m_value
 Buffer holding option value. More...
 
DbColumn::Type m_type
 Option data type. More...
 
std::string m_name
 Option name identifier. More...
 
std::string m_opt
 Optional identifier. More...
 

Detailed Description

Description: Definition an option to be supplied to database objects.

Note: For any pointer argument, values are not copied. The values must outlive the lifetime of the DbOption.

Author
M.Frank
Version
1.0

Definition at line 36 of file DbOption.h.

Constructor & Destructor Documentation

◆ DbOption() [1/2]

template<class T >
pool::DbOption::DbOption ( const std::string &  nam,
const std::string &  opt,
value 
)
inline

Initializing constructor.

Definition at line 69 of file DbOption.h.

73  { i_setValue(typeid(T), &value); }

◆ DbOption() [2/2]

pool::DbOption::DbOption ( const std::string &  nam,
const std::string &  opt = "" 
)

Initializing constructor with type definition.

◆ ~DbOption()

virtual pool::DbOption::~DbOption ( )
inlinevirtual

Default copy constructor Standard destructor.

Definition at line 78 of file DbOption.h.

78 { }

Member Function Documentation

◆ _getValue()

template<class T >
DbStatus pool::DbOption::_getValue ( T &  value) const
inline

Set the option value.

Definition at line 89 of file DbOption.h.

90  { return i_getValue(typeid(T), &value); }

◆ _setValue()

template<class T >
DbStatus pool::DbOption::_setValue ( value)
inline

Set the option value.

Definition at line 86 of file DbOption.h.

87  { return i_setValue(typeid(T), &value); }

◆ getValue()

DbStatus pool::DbOption::getValue ( DbColumn::Type  typ,
void *  value 
) const

Set the option value.

◆ i_getValue()

DbStatus pool::DbOption::i_getValue ( const std::type_info &  typ,
void *  value 
) const

Set the option value.

◆ i_setValue()

DbStatus pool::DbOption::i_setValue ( const std::type_info &  typ,
const void *  value 
)

Set the option value.

◆ name()

const std::string& pool::DbOption::name ( ) const
inline

Access to column name.

Definition at line 82 of file DbOption.h.

82 { return m_name; }

◆ option()

const std::string& pool::DbOption::option ( ) const
inline

Access to column name.

Definition at line 80 of file DbOption.h.

80 { return m_opt; }

◆ setValue()

DbStatus pool::DbOption::setValue ( DbColumn::Type  typ,
const void *  value 
)

Set the option value.

◆ type()

DbColumn::Type pool::DbOption::type ( ) const
inline

Integer type identifier.

Definition at line 84 of file DbOption.h.

84 { return m_type; }

◆ typeName()

std::string pool::DbOption::typeName ( ) const

Access to OS independent type name.

Member Data Documentation

◆ m_name

std::string pool::DbOption::m_name

Option name identifier.

Definition at line 58 of file DbOption.h.

◆ m_opt

std::string pool::DbOption::m_opt

Optional identifier.

Definition at line 60 of file DbOption.h.

◆ m_type

DbColumn::Type pool::DbOption::m_type

Option data type.

Definition at line 56 of file DbOption.h.

◆ m_value

Value pool::DbOption::m_value

Buffer holding option value.

Definition at line 54 of file DbOption.h.


The documentation for this class was generated from the following file:
pool::DbOption::m_opt
std::string m_opt
Optional identifier.
Definition: DbOption.h:60
pool::DbOption::i_getValue
DbStatus i_getValue(const std::type_info &typ, void *value) const
Set the option value.
pool::DbOption::i_setValue
DbStatus i_setValue(const std::type_info &typ, const void *value)
Set the option value.
athena.value
value
Definition: athena.py:122
pool::DbOption::m_type
DbColumn::Type m_type
Option data type.
Definition: DbOption.h:56
pool::DbOption::m_name
std::string m_name
Option name identifier.
Definition: DbOption.h:58
pmontree.opt
opt
Definition: pmontree.py:16
pool::DbColumn::UNKNOWN
@ UNKNOWN
Definition: DbColumn.h:45
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35