ATLAS Offline Software
Loading...
Searching...
No Matches
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
13namespace pool {
14
21 {
22 public:
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
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
CollectionColumn()
Default constructor.
void setName(const std::string &name)
Sets the name of the column.
CollectionColumn(const CollectionColumn &rhs)
Copy constructor.
const std::string & name() const
Returns the name of the column.
void setType(const std::string &type)
Sets the data type of the column.
std::string m_name
Name of column.
void setType(const std::type_info &type)
Sets the data type of the column.
CollectionColumn(const std::string &name, const std::string &type)
Constructor that takes the column properties as input.
std::string m_type
Data type of column.
int id() const
Returns the position of the column in its associated collection fragment.
int m_id
Position of column in associated collection fragment.
void setId(int id)
Sets the position of the column in its associated collection fragment.
const std::string & type() const
Returns the data type of the column.
pool namespace
Definition libname.h:15