g4tools  5.4.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tools::wcsv::ntuple::column< T > Class Template Reference
Inheritance diagram for tools::wcsv::ntuple::column< T >:
Inheritance graph
[legend]
Collaboration diagram for tools::wcsv::ntuple::column< T >:
Collaboration graph
[legend]

Public Member Functions

virtual void * cast (cid a_class) const
 
virtual cid id_cls () const
 
virtual void add ()
 
 column (std::ostream &a_writer, const std::string &a_name, const T &a_def)
 
virtual ~column ()
 
bool fill (const T &a_value)
 
- Public Member Functions inherited from tools::wcsv::ntuple::column_ref< T >
virtual const std::string & name () const
 
 column_ref (std::ostream &a_writer, const std::string &a_name, const T &a_ref)
 
virtual ~column_ref ()
 
- Public Member Functions inherited from tools::wcsv::ntuple::icol
virtual ~icol ()
 

Static Public Member Functions

static cid id_class ()
 
- Static Public Member Functions inherited from tools::wcsv::ntuple::column_ref< T >
static cid id_class ()
 

Protected Member Functions

 column (const column &a_from)
 
columnoperator= (const column &a_from)
 
- Protected Member Functions inherited from tools::wcsv::ntuple::column_ref< T >
 column_ref (const column_ref &a_from)
 
column_refoperator= (const column_ref &a_from)
 

Protected Attributes

m_def
 
m_tmp
 
- Protected Attributes inherited from tools::wcsv::ntuple::column_ref< T >
std::ostream & m_writer
 
std::string m_name
 
const T & m_ref
 

Detailed Description

template<class T>
class tools::wcsv::ntuple::column< T >

Definition at line 82 of file wcsv_ntuple.

Constructor & Destructor Documentation

◆ column() [1/2]

template<class T >
tools::wcsv::ntuple::column< T >::column ( std::ostream &  a_writer,
const std::string &  a_name,
const T &  a_def 
)
inline

Definition at line 97 of file wcsv_ntuple.

98  :parent(a_writer,a_name,m_tmp)
99  ,m_def(a_def)
100  ,m_tmp(a_def)
101  {}

◆ ~column()

template<class T >
virtual tools::wcsv::ntuple::column< T >::~column ( )
inlinevirtual

Definition at line 102 of file wcsv_ntuple.

102 {}

◆ column() [2/2]

template<class T >
tools::wcsv::ntuple::column< T >::column ( const column< T > &  a_from)
inlineprotected

Definition at line 104 of file wcsv_ntuple.

105  :icol(a_from)
106  ,parent(a_from)
107  ,m_def(a_from.m_def)
108  ,m_tmp(a_from.m_tmp)
109  {}

Member Function Documentation

◆ add()

template<class T >
virtual void tools::wcsv::ntuple::column< T >::add ( )
inlinevirtual

Reimplemented from tools::wcsv::ntuple::column_ref< T >.

Definition at line 95 of file wcsv_ntuple.

95 {parent::add();m_tmp = m_def;}

◆ cast()

template<class T >
virtual void* tools::wcsv::ntuple::column< T >::cast ( cid  a_class) const
inlinevirtual

Reimplemented from tools::wcsv::ntuple::column_ref< T >.

Definition at line 89 of file wcsv_ntuple.

89  {
90  if(void* p = cmp_cast<column>(this,a_class)) {return p;}
91  else return 0;
92  }

◆ fill()

template<class T >
bool tools::wcsv::ntuple::column< T >::fill ( const T &  a_value)
inline

Definition at line 117 of file wcsv_ntuple.

117 {m_tmp = a_value;return true;}

◆ id_class()

template<class T >
static cid tools::wcsv::ntuple::column< T >::id_class ( )
inlinestatic

Definition at line 85 of file wcsv_ntuple.

85  {
86  static const T s_v = T(); //do that for T = std::string.
87  return _cid(s_v);
88  }

◆ id_cls()

template<class T >
virtual cid tools::wcsv::ntuple::column< T >::id_cls ( ) const
inlinevirtual

Reimplemented from tools::wcsv::ntuple::column_ref< T >.

Definition at line 93 of file wcsv_ntuple.

93 {return id_class();}

◆ operator=()

template<class T >
column& tools::wcsv::ntuple::column< T >::operator= ( const column< T > &  a_from)
inlineprotected

Definition at line 110 of file wcsv_ntuple.

110  {
111  parent::operator=(a_from);
112  m_def = a_from.m_def;
113  m_tmp = a_from.m_tmp;
114  return *this;
115  }

Member Data Documentation

◆ m_def

template<class T >
T tools::wcsv::ntuple::column< T >::m_def
protected

Definition at line 119 of file wcsv_ntuple.

◆ m_tmp

template<class T >
T tools::wcsv::ntuple::column< T >::m_tmp
protected

Definition at line 120 of file wcsv_ntuple.


The documentation for this class was generated from the following file:
tools::_cid
cid _cid(byte)
Definition: cids:14
tools::wcsv::ntuple::column::id_class
static cid id_class()
Definition: wcsv_ntuple:85
tools::wcsv::ntuple::column_ref::operator=
column_ref & operator=(const column_ref &a_from)
Definition: wcsv_ntuple:71
tools::wcsv::ntuple::column_ref::add
virtual void add()
Definition: wcsv_ntuple:55
tools::wcsv::ntuple::column::m_tmp
T m_tmp
Definition: wcsv_ntuple:120
tools::wcsv::ntuple::column::m_def
T m_def
Definition: wcsv_ntuple:119