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

Public Member Functions

virtual void * cast (cid a_class) const
 
virtual cid id_cls () const
 
virtual void add ()
 
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 ()
 

Protected Member Functions

 column_ref (const column_ref &a_from)
 
column_refoperator= (const column_ref &a_from)
 

Protected Attributes

std::ostream & m_writer
 
std::string m_name
 
const T & m_ref
 

Detailed Description

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

Definition at line 43 of file wcsv_ntuple.

Constructor & Destructor Documentation

◆ column_ref() [1/2]

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

Definition at line 58 of file wcsv_ntuple.

59  :m_writer(a_writer)
60  ,m_name(a_name)
61  ,m_ref(a_ref)
62  {}

◆ ~column_ref()

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

Definition at line 63 of file wcsv_ntuple.

63 {}

◆ column_ref() [2/2]

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

Definition at line 65 of file wcsv_ntuple.

66  :icol(a_from)
67  ,m_writer(a_from.m_writer)
68  ,m_name(a_from.m_name)
69  ,m_ref(a_from.m_ref)
70  {}

Member Function Documentation

◆ add()

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

Implements tools::wcsv::ntuple::icol.

Reimplemented in tools::wcsv::ntuple::column< T >.

Definition at line 55 of file wcsv_ntuple.

55 {m_writer << m_ref;}

◆ cast()

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

Implements tools::wcsv::ntuple::icol.

Reimplemented in tools::wcsv::ntuple::column< T >.

Definition at line 49 of file wcsv_ntuple.

49  {
50  if(void* p = cmp_cast<column_ref>(this,a_class)) {return p;}
51  else return 0;
52  }

◆ id_class()

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

Definition at line 45 of file wcsv_ntuple.

45  {
46  static const T s_v = T(); //do that for T = std::string.
47  return _cid(s_v)+10000;
48  }

◆ id_cls()

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

Implements tools::wcsv::ntuple::icol.

Reimplemented in tools::wcsv::ntuple::column< T >.

Definition at line 53 of file wcsv_ntuple.

53 {return id_class();}

◆ name()

template<class T >
virtual const std::string& tools::wcsv::ntuple::column_ref< T >::name ( ) const
inlinevirtual

Implements tools::wcsv::ntuple::icol.

Definition at line 56 of file wcsv_ntuple.

56 {return m_name;}

◆ operator=()

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

Definition at line 71 of file wcsv_ntuple.

71  {
72  m_name = a_from.m_name;
73  return *this;
74  }

Member Data Documentation

◆ m_name

template<class T >
std::string tools::wcsv::ntuple::column_ref< T >::m_name
protected

Definition at line 77 of file wcsv_ntuple.

◆ m_ref

template<class T >
const T& tools::wcsv::ntuple::column_ref< T >::m_ref
protected

Definition at line 78 of file wcsv_ntuple.

◆ m_writer

template<class T >
std::ostream& tools::wcsv::ntuple::column_ref< T >::m_writer
protected

Definition at line 76 of file wcsv_ntuple.


The documentation for this class was generated from the following file:
tools::wcsv::ntuple::column_ref::id_class
static cid id_class()
Definition: wcsv_ntuple:45
tools::_cid
cid _cid(byte)
Definition: cids:14
tools::wcsv::ntuple::column_ref::m_name
std::string m_name
Definition: wcsv_ntuple:77
tools::wcsv::ntuple::column_ref::m_ref
const T & m_ref
Definition: wcsv_ntuple:78
tools::wcsv::ntuple::column_ref::m_writer
std::ostream & m_writer
Definition: wcsv_ntuple:76