ATLAS Offline Software
Loading...
Searching...
No Matches
pool::CollectionDescription Class Reference

An implementation used to define the properties of a collection to be constructed and to retrieve these properties after construction. More...

#include <CollectionSvc/CollectionDescription.h>

Collaboration diagram for pool::CollectionDescription:

Public Member Functions

 CollectionDescription (const std::string &name, const DbType &type, const std::string &connection="")
 Constructor that takes as input the minimum amount of properties needed to describe the collection.
 CollectionDescription (const CollectionDescription &rhs)
 Copy constructor.
 ~CollectionDescription ()
 Default destructor.
CollectionDescription & operator= (const CollectionDescription &rhs)
 Assignment operator.
CollectionDescription & operator= (CollectionDescription &&rhs)
 CollectionDescription (CollectionDescription &&)=default
void setName (const std::string &name)
 Sets the name of the collection.
void setType (const DbType &type)
 Sets the storage technology type of the collection.
void setConnection (const std::string &connection)
 Sets the connection to the database containing the collection.
const CollectionColumn & insertColumn (const std::string &columnName, const std::string &columnType)
 Adds a new column to the collection.
const std::string & name () const
 Returns the name of the collection and the top level collection fragment.
const DbType & type () const
 Returns the storage technology type of the collection.
const std::string & connection () const
 Returns the connection to the database containing the collection.
int numberOfAttributeColumns () const
 Returns the number of Attribute columns in the collection.
const CollectionColumn & attributeColumn (int columnId) const
 Returns a description object for an Attribute column of the collection, given the position of the column.

Static Public Member Functions

static const CollectionColumn & tokenColumn ()
 Returns a description object for the default Token column of the collection.

Protected Member Functions

void copyFrom (const CollectionDescription &rhs)
 make this description a copy of 'rhs'
void clearAll ()
void checkNewColumnName (const std::string &name) const

Private Types

typedef std::map< std::string, CollectionColumn * > ColumnByName

Private Attributes

std::string m_name
 Name of the collection.
DbType m_type
 Storage technology type of collection.
std::string m_connection
 Connection to database containing collection.
std::vector< pool::CollectionColumn * > m_attributeColumns
 Attribute column description objects.
ColumnByName m_attributeColumnForColumnName
 Map of Attribute CollectionColumn objects using column names as keys.

Static Private Attributes

static const pool::CollectionColumn m_tokenColumn

Detailed Description

An implementation used to define the properties of a collection to be constructed and to retrieve these properties after construction.

Definition at line 25 of file CollectionDescription.h.

Member Typedef Documentation

◆ ColumnByName

typedef std::map< std::string, CollectionColumn* > pool::CollectionDescription::ColumnByName
private

Definition at line 150 of file CollectionDescription.h.

Constructor & Destructor Documentation

◆ CollectionDescription() [1/3]

pool::CollectionDescription::CollectionDescription ( const std::string & name,
const DbType & type,
const std::string & connection = "" )

Constructor that takes as input the minimum amount of properties needed to describe the collection.

Parameters
nameName of collection.
typeStorage technology type of collection.
connectionConnection to database containing collection.

◆ CollectionDescription() [2/3]

pool::CollectionDescription::CollectionDescription ( const CollectionDescription & rhs)

Copy constructor.

Parameters
rhsCollection description object to copy.

◆ ~CollectionDescription()

pool::CollectionDescription::~CollectionDescription ( )

Default destructor.

◆ CollectionDescription() [3/3]

pool::CollectionDescription::CollectionDescription ( CollectionDescription && )
default

Member Function Documentation

◆ attributeColumn()

const CollectionColumn & pool::CollectionDescription::attributeColumn ( int columnId) const

Returns a description object for an Attribute column of the collection, given the position of the column.

Parameters
columnIdPosition of column in associated collection fragment.

◆ checkNewColumnName()

void pool::CollectionDescription::checkNewColumnName ( const std::string & name) const
protected

◆ clearAll()

void pool::CollectionDescription::clearAll ( )
protected

◆ connection()

const std::string & pool::CollectionDescription::connection ( ) const

Returns the connection to the database containing the collection.

◆ copyFrom()

void pool::CollectionDescription::copyFrom ( const CollectionDescription & rhs)
protected

make this description a copy of 'rhs'

◆ insertColumn()

const CollectionColumn & pool::CollectionDescription::insertColumn ( const std::string & columnName,
const std::string & columnType )

Adds a new column to the collection.

Parameters
columnNameName of new column.
columnTypeData type of new column.

◆ name()

const std::string & pool::CollectionDescription::name ( ) const

Returns the name of the collection and the top level collection fragment.

◆ numberOfAttributeColumns()

int pool::CollectionDescription::numberOfAttributeColumns ( ) const

Returns the number of Attribute columns in the collection.

◆ operator=() [1/2]

CollectionDescription & pool::CollectionDescription::operator= ( CollectionDescription && rhs)
inline

Definition at line 58 of file CollectionDescription.h.

59 { operator=( (const CollectionDescription&) rhs ); return *this; }
CollectionDescription(const std::string &name, const DbType &type, const std::string &connection="")
Constructor that takes as input the minimum amount of properties needed to describe the collection.
CollectionDescription & operator=(const CollectionDescription &rhs)
Assignment operator.

◆ operator=() [2/2]

CollectionDescription & pool::CollectionDescription::operator= ( const CollectionDescription & rhs)

Assignment operator.

Parameters
rhssource CollectionDescription object to copy.

◆ setConnection()

void pool::CollectionDescription::setConnection ( const std::string & connection)

Sets the connection to the database containing the collection.

Parameters
connectionConnection to database where collection is stored.

◆ setName()

void pool::CollectionDescription::setName ( const std::string & name)

Sets the name of the collection.

Parameters
nameName of collection.

◆ setType()

void pool::CollectionDescription::setType ( const DbType & type)

Sets the storage technology type of the collection.

Parameters
typeStorage technology type of collection.

◆ tokenColumn()

const CollectionColumn & pool::CollectionDescription::tokenColumn ( )
inlinestatic

Returns a description object for the default Token column of the collection.

Definition at line 107 of file CollectionDescription.h.

107{ return m_tokenColumn; }
static const pool::CollectionColumn m_tokenColumn

◆ type()

const DbType & pool::CollectionDescription::type ( ) const

Returns the storage technology type of the collection.

Member Data Documentation

◆ m_attributeColumnForColumnName

ColumnByName pool::CollectionDescription::m_attributeColumnForColumnName
private

Map of Attribute CollectionColumn objects using column names as keys.

Definition at line 152 of file CollectionDescription.h.

◆ m_attributeColumns

std::vector< pool::CollectionColumn* > pool::CollectionDescription::m_attributeColumns
private

Attribute column description objects.

Definition at line 148 of file CollectionDescription.h.

◆ m_connection

std::string pool::CollectionDescription::m_connection
private

Connection to database containing collection.

Definition at line 142 of file CollectionDescription.h.

◆ m_name

std::string pool::CollectionDescription::m_name
private

Name of the collection.

Definition at line 136 of file CollectionDescription.h.

◆ m_tokenColumn

const pool::CollectionColumn pool::CollectionDescription::m_tokenColumn
staticprivate

Definition at line 145 of file CollectionDescription.h.

◆ m_type

DbType pool::CollectionDescription::m_type
private

Storage technology type of collection.

Definition at line 139 of file CollectionDescription.h.


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