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

An implementation for retrieving a description of a column of a collection. More...

#include <CollectionSvc/CollectionColumn.h>

Collaboration diagram for pool::CollectionColumn:

Public Member Functions

 CollectionColumn ()
 Default constructor.
 CollectionColumn (const std::string &name, const std::string &type)
 Constructor that takes the column properties as input.
 CollectionColumn (const CollectionColumn &rhs)
 Copy constructor.
void setName (const std::string &name)
 Sets the name of the column.
void setType (const std::string &type)
 Sets the data type of the column.
void setType (const std::type_info &type)
 Sets the data type of the column.
void setId (int id)
 Sets the position of the column in its associated collection fragment.
const std::string & name () const
 Returns the name of the column.
const std::string & type () const
 Returns the data type of the column.
int id () const
 Returns the position of the column in its associated collection fragment.

Private Attributes

std::string m_name
 Name of column.
std::string m_type
 Data type of column.
int m_id
 Position of column in associated collection fragment.

Detailed Description

An implementation for retrieving a description of a column of a collection.

Definition at line 20 of file CollectionColumn.h.

Constructor & Destructor Documentation

◆ CollectionColumn() [1/3]

pool::CollectionColumn::CollectionColumn ( )
inline

Default constructor.

Definition at line 24 of file CollectionColumn.h.

25 : m_name( "" ),
26 m_type( "" ),
27 m_id( 0 ) {}
std::string m_name
Name of column.
std::string m_type
Data type of column.
int m_id
Position of column in associated collection fragment.

◆ CollectionColumn() [2/3]

pool::CollectionColumn::CollectionColumn ( const std::string & name,
const std::string & type )
inline

Constructor that takes the column properties as input.

Parameters
nameName of column.
typeData type of column.

Definition at line 35 of file CollectionColumn.h.

37 : m_name( name ),
38 m_type( type ),
39 m_id( 0 ) {}
const std::string & name() const
Returns the name of the column.
const std::string & type() const
Returns the data type of the column.

◆ CollectionColumn() [3/3]

pool::CollectionColumn::CollectionColumn ( const CollectionColumn & rhs)
inline

Copy constructor.

Definition at line 42 of file CollectionColumn.h.

43 : m_name( rhs.m_name ),
44 m_type( rhs.m_type ),
45 m_id( rhs.m_id )
46 {}

Member Function Documentation

◆ id()

int pool::CollectionColumn::id ( ) const
inline

Returns the position of the column in its associated collection fragment.

Definition at line 80 of file CollectionColumn.h.

80{ return m_id; }

◆ name()

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

Returns the name of the column.

Definition at line 74 of file CollectionColumn.h.

74{ return m_name; }

◆ setId()

void pool::CollectionColumn::setId ( int id)
inline

Sets the position of the column in its associated collection fragment.

Definition at line 71 of file CollectionColumn.h.

71{ m_id = id; }
int id() const
Returns the position of the column in its associated collection fragment.

◆ setName()

void pool::CollectionColumn::setName ( const std::string & name)
inline

Sets the name of the column.

Parameters
nameName of column.

Definition at line 53 of file CollectionColumn.h.

53{ m_name = name; }

◆ setType() [1/2]

void pool::CollectionColumn::setType ( const std::string & type)
inline

Sets the data type of the column.

Parameters
typeData type of column.

Definition at line 60 of file CollectionColumn.h.

60{ m_type = type; }

◆ setType() [2/2]

void pool::CollectionColumn::setType ( const std::type_info & type)
inline

Sets the data type of the column.

Parameters
typeData type of column.

Definition at line 67 of file CollectionColumn.h.

68 { m_type = coral::AttributeSpecification::typeNameForId( type ); }

◆ type()

const std::string & pool::CollectionColumn::type ( ) const
inline

Returns the data type of the column.

Definition at line 77 of file CollectionColumn.h.

77{ return m_type; }

Member Data Documentation

◆ m_id

int pool::CollectionColumn::m_id
private

Position of column in associated collection fragment.

Definition at line 90 of file CollectionColumn.h.

◆ m_name

std::string pool::CollectionColumn::m_name
private

Name of column.

Definition at line 84 of file CollectionColumn.h.

◆ m_type

std::string pool::CollectionColumn::m_type
private

Data type of column.

Definition at line 87 of file CollectionColumn.h.


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