ATLAS Offline Software
Loading...
Searching...
No Matches
DbTypeInfo Class Reference

Definition of class DbTypeInfo. More...

#include <StorageSvc/DbTypeInfo.h>

Collaboration diagram for DbTypeInfo:

Public Types

typedef std::vector< const DbColumn * > Columns
 Column Container definition.

Public Member Functions

const Guid & typeID () const
 Access the type identifier.
Guid & typeID ()
void setTypeID (const Guid &id)
 Set the type identifier.
Guid & setTypeID (const std::string &id)
void destroy ()
 Destroy type information; to be used with extreme care.
void addRef () const
void deleteRef () const
 Releases the ownership.
RootType clazz (bool noIdScan=false) const
 Access to reflection class. If not known, by default scan all types for class ID.
const Columns & columns () const
 Prepare for the case of discrete columns: Column information.
Columns & columns ()
 Modify content of the object by editing columns.
const std::string toString () const
 Create string representation of the type information object.
StatusCode declareBase (const DbTypeInfo *pInfo)
 Allow usage of base classes.

Static Public Member Functions

static const DbTypeInfo * create (const std::string &cl_name)
 Create type information using name.
static const DbTypeInfo * create (const std::string &cl_name, Columns &cols)
 Create type information using name.
static const DbTypeInfo * create (const Guid &guid)
 Create type information using Guid only Class must already be registered.
static const DbTypeInfo * create (const Guid &guid, Columns &cols)
 Create type information using Guid only Class must already be registered.
static const DbTypeInfo * createEx (const Guid &guid)
 Create type information using Guid only Class must already be registered.
static const DbTypeInfo * createEx (const Guid &guid, Columns &cols)
 Create type information using Guid only Class must already be registered.
static const DbTypeInfo * fromString (const std::string &string_rep)
 Load type information object from string representation.
static const std::string typeName (const std::type_info &typ)
 Access type name by type identifier from RTTI.

Protected Member Functions

 DbTypeInfo (const Guid &guid, RootType cl, Columns &cols)
 Constructor with type id.
 DbTypeInfo (const Guid &guid)
 ~DbTypeInfo ()
 Destructor.
StatusCode i_fromString (const std::string &string_rep)
 Load type information object from string representation.

Static Protected Member Functions

static DbTypeInfo * regShape (const Guid &guid, const RootType &type, Columns &cols)
 try to add a new shape

Private Attributes

std::atomic< int > m_refCount
 Reference counter.
Guid m_id
 Type global identifier.
Columns m_columns
 Column definitions.
int m_mult
 Multiplicity.
CxxUtils::CachedValue< RootType > m_class
 Reflection class.

Detailed Description

Definition of class DbTypeInfo.

Description: Generalized persistent type information

Author
M.Frank

Definition at line 31 of file DbTypeInfo.h.

Member Typedef Documentation

◆ Columns

typedef std::vector<const DbColumn*> DbTypeInfo::Columns

Column Container definition.

Definition at line 35 of file DbTypeInfo.h.

Constructor & Destructor Documentation

◆ DbTypeInfo() [1/2]

DbTypeInfo::DbTypeInfo ( const Guid & guid,
RootType cl,
Columns & cols )
protected

Constructor with type id.

◆ DbTypeInfo() [2/2]

DbTypeInfo::DbTypeInfo ( const Guid & guid)
protected

◆ ~DbTypeInfo()

DbTypeInfo::~DbTypeInfo ( )
protected

Destructor.

Member Function Documentation

◆ addRef()

void DbTypeInfo::addRef ( ) const
inline

Definition at line 94 of file DbTypeInfo.h.

94{ ++m_refCount; }
std::atomic< int > m_refCount
Reference counter.
Definition DbTypeInfo.h:39

◆ clazz()

RootType DbTypeInfo::clazz ( bool noIdScan = false) const

Access to reflection class. If not known, by default scan all types for class ID.

◆ columns() [1/2]

Columns & DbTypeInfo::columns ( )
inline

Modify content of the object by editing columns.

Definition at line 102 of file DbTypeInfo.h.

102{ return m_columns; }
Columns m_columns
Column definitions.
Definition DbTypeInfo.h:43

◆ columns() [2/2]

const Columns & DbTypeInfo::columns ( ) const
inline

Prepare for the case of discrete columns: Column information.

Definition at line 100 of file DbTypeInfo.h.

100{ return m_columns; }

◆ create() [1/4]

const DbTypeInfo * DbTypeInfo::create ( const Guid & guid)
static

Create type information using Guid only Class must already be registered.

Note: Existence of reflection class is Mandatory!

◆ create() [2/4]

const DbTypeInfo * DbTypeInfo::create ( const Guid & guid,
Columns & cols )
static

Create type information using Guid only Class must already be registered.

Note: Existence of reflection class is Mandatory!

◆ create() [3/4]

const DbTypeInfo * DbTypeInfo::create ( const std::string & cl_name)
static

Create type information using name.

Note: Existence of reflection class is Mandatory!

◆ create() [4/4]

const DbTypeInfo * DbTypeInfo::create ( const std::string & cl_name,
Columns & cols )
static

Create type information using name.

◆ createEx() [1/2]

const DbTypeInfo * DbTypeInfo::createEx ( const Guid & guid)
static

Create type information using Guid only Class must already be registered.

Note: Existence of reflection class is NOT mandatory!

◆ createEx() [2/2]

const DbTypeInfo * DbTypeInfo::createEx ( const Guid & guid,
Columns & cols )
static

Create type information using Guid only Class must already be registered.

Note: Existence of reflection class is NOT mandatory!

◆ declareBase()

StatusCode DbTypeInfo::declareBase ( const DbTypeInfo * pInfo)

Allow usage of base classes.

◆ deleteRef()

void DbTypeInfo::deleteRef ( ) const

Releases the ownership.

◆ destroy()

void DbTypeInfo::destroy ( )
inline

Destroy type information; to be used with extreme care.

Definition at line 71 of file DbTypeInfo.h.

71{ delete this; }

◆ fromString()

const DbTypeInfo * DbTypeInfo::fromString ( const std::string & string_rep)
static

Load type information object from string representation.

◆ i_fromString()

StatusCode DbTypeInfo::i_fromString ( const std::string & string_rep)
protected

Load type information object from string representation.

◆ regShape()

DbTypeInfo * DbTypeInfo::regShape ( const Guid & guid,
const RootType & type,
Columns & cols )
staticprotected

try to add a new shape

◆ setTypeID() [1/2]

void DbTypeInfo::setTypeID ( const Guid & id)
inline

Set the type identifier.

Definition at line 67 of file DbTypeInfo.h.

67{ m_id=id; }
Guid m_id
Type global identifier.
Definition DbTypeInfo.h:41

◆ setTypeID() [2/2]

Guid & DbTypeInfo::setTypeID ( const std::string & id)
inline

Definition at line 68 of file DbTypeInfo.h.

68{ m_id.fromString(id); return typeID(); }
const Guid & typeID() const
Access the type identifier.
Definition DbTypeInfo.h:64

◆ toString()

const std::string DbTypeInfo::toString ( ) const

Create string representation of the type information object.

◆ typeID() [1/2]

Guid & DbTypeInfo::typeID ( )
inline

Definition at line 65 of file DbTypeInfo.h.

65{ return m_id; }

◆ typeID() [2/2]

const Guid & DbTypeInfo::typeID ( ) const
inline

Access the type identifier.

Definition at line 64 of file DbTypeInfo.h.

64{ return m_id; }

◆ typeName()

const std::string DbTypeInfo::typeName ( const std::type_info & typ)
static

Access type name by type identifier from RTTI.

Member Data Documentation

◆ m_class

CxxUtils::CachedValue<RootType> DbTypeInfo::m_class
private

Reflection class.

Definition at line 47 of file DbTypeInfo.h.

◆ m_columns

Columns DbTypeInfo::m_columns
private

Column definitions.

Definition at line 43 of file DbTypeInfo.h.

◆ m_id

Guid DbTypeInfo::m_id
private

Type global identifier.

Definition at line 41 of file DbTypeInfo.h.

◆ m_mult

int DbTypeInfo::m_mult
private

Multiplicity.

Definition at line 45 of file DbTypeInfo.h.

◆ m_refCount

std::atomic<int> DbTypeInfo::m_refCount
mutableprivate

Reference counter.

Definition at line 39 of file DbTypeInfo.h.


The documentation for this class was generated from the following file: