ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
APR
CollectionSvc
CollectionSvc
CollectionColumn.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef COLLECTIONSVC_COLLECTIONCOLUMN_H
6
#define COLLECTIONSVC_COLLECTIONCOLUMN_H
7
8
#include "CoralBase/AttributeSpecification.h"
9
10
#include <typeinfo>
11
12
13
namespace
pool
{
14
20
class
CollectionColumn
21
{
22
public
:
24
CollectionColumn
()
25
:
m_name
(
""
),
26
m_type
(
""
),
27
m_id
( 0 ) {}
28
35
CollectionColumn
(
const
std::string&
name
,
36
const
std::string&
type
)
37
:
m_name
(
name
),
38
m_type
(
type
),
39
m_id
( 0 ) {}
40
42
CollectionColumn
(
const
CollectionColumn
& rhs )
43
:
m_name
( rhs.
m_name
),
44
m_type
( rhs.
m_type
),
45
m_id
( rhs.
m_id
)
46
{}
47
53
void
setName
(
const
std::string&
name
) {
m_name
=
name
; }
54
60
void
setType
(
const
std::string&
type
) {
m_type
=
type
; }
61
67
void
setType
(
const
std::type_info&
type
)
68
{
m_type
= coral::AttributeSpecification::typeNameForId(
type
); }
69
71
void
setId
(
int
id
) {
m_id
=
id
; }
72
74
const
std::string&
name
()
const
{
return
m_name
; }
75
77
const
std::string&
type
()
const
{
return
m_type
; }
78
80
int
id
()
const
{
return
m_id
; }
81
82
private
:
84
std::string
m_name
;
85
87
std::string
m_type
;
88
90
int
m_id
;
91
};
92
}
93
94
#endif
pool::CollectionColumn::CollectionColumn
CollectionColumn()
Default constructor.
Definition
CollectionColumn.h:24
pool::CollectionColumn::setName
void setName(const std::string &name)
Sets the name of the column.
Definition
CollectionColumn.h:53
pool::CollectionColumn::CollectionColumn
CollectionColumn(const CollectionColumn &rhs)
Copy constructor.
Definition
CollectionColumn.h:42
pool::CollectionColumn::name
const std::string & name() const
Returns the name of the column.
Definition
CollectionColumn.h:74
pool::CollectionColumn::setType
void setType(const std::string &type)
Sets the data type of the column.
Definition
CollectionColumn.h:60
pool::CollectionColumn::m_name
std::string m_name
Name of column.
Definition
CollectionColumn.h:84
pool::CollectionColumn::setType
void setType(const std::type_info &type)
Sets the data type of the column.
Definition
CollectionColumn.h:67
pool::CollectionColumn::CollectionColumn
CollectionColumn(const std::string &name, const std::string &type)
Constructor that takes the column properties as input.
Definition
CollectionColumn.h:35
pool::CollectionColumn::m_type
std::string m_type
Data type of column.
Definition
CollectionColumn.h:87
pool::CollectionColumn::id
int id() const
Returns the position of the column in its associated collection fragment.
Definition
CollectionColumn.h:80
pool::CollectionColumn::m_id
int m_id
Position of column in associated collection fragment.
Definition
CollectionColumn.h:90
pool::CollectionColumn::setId
void setId(int id)
Sets the position of the column in its associated collection fragment.
Definition
CollectionColumn.h:71
pool::CollectionColumn::type
const std::string & type() const
Returns the data type of the column.
Definition
CollectionColumn.h:77
pool
Framework include files.
Definition
libname.h:15
Generated on
for ATLAS Offline Software by
1.17.0