g4tools  5.4.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tools::wcsv::ntuple::std_vector_column< T > Class Template Reference
Inheritance diagram for tools::wcsv::ntuple::std_vector_column< T >:
Inheritance graph
[legend]
Collaboration diagram for tools::wcsv::ntuple::std_vector_column< 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
 
 std_vector_column (std::ostream &a_writer, const std::string &a_name, const std::vector< T > &a_ref, char a_vec_sep)
 
virtual ~std_vector_column ()
 
- Public Member Functions inherited from tools::wcsv::ntuple::icol
virtual ~icol ()
 

Static Public Member Functions

static cid id_class ()
 

Protected Member Functions

 std_vector_column (const std_vector_column &a_from)
 
std_vector_columnoperator= (const std_vector_column &a_from)
 

Protected Attributes

std::ostream & m_writer
 
std::string m_name
 
const std::vector< T > & m_ref
 
char m_vec_sep
 

Detailed Description

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

Definition at line 132 of file wcsv_ntuple.

Constructor & Destructor Documentation

◆ std_vector_column() [1/2]

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

Definition at line 158 of file wcsv_ntuple.

159  :m_writer(a_writer)
160  ,m_name(a_name)
161  ,m_ref(a_ref)
162  ,m_vec_sep(a_vec_sep)
163  {}

◆ ~std_vector_column()

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

Definition at line 164 of file wcsv_ntuple.

164 {}

◆ std_vector_column() [2/2]

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

Definition at line 166 of file wcsv_ntuple.

167  :icol(a_from)
168  ,m_writer(a_from.m_writer)
169  ,m_name(a_from.m_name)
170  ,m_ref(a_from.m_ref)
171  ,m_vec_sep(a_from.m_vec_sep)
172  {}

Member Function Documentation

◆ add()

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

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

Definition at line 141 of file wcsv_ntuple.

141  {
142  if(m_ref.empty()) {
143  //m_writer << "none";
144  } else {
145  //std::string sep;sep+=m_vec_sep;
146  //T value;
147  typedef typename std::vector<T>::const_iterator it_t;
148  for(it_t it=m_ref.begin();it!=m_ref.end();++it) {
149  if(it!=m_ref.begin()) m_writer << m_vec_sep;
150  m_writer << *it;
151  //value = *it;escape(value,sep);
152  //m_writer << value;
153  }
154  }
155  }

◆ cast()

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

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

Definition at line 135 of file wcsv_ntuple.

135  {
136  if(void* p = cmp_cast<std_vector_column>(this,a_class)) {return p;}
137  else return 0;
138  }

◆ id_class()

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

Definition at line 134 of file wcsv_ntuple.

134 {return _cid_std_vector<T>();}

◆ id_cls()

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

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

Definition at line 139 of file wcsv_ntuple.

139 {return id_class();}

◆ name()

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

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

Definition at line 156 of file wcsv_ntuple.

156 {return m_name;}

◆ operator=()

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

Definition at line 173 of file wcsv_ntuple.

173  {
174  m_name = a_from.m_name;
175  m_vec_sep = a_from.m_vec_sep;
176  return *this;
177  }

Member Data Documentation

◆ m_name

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

Definition at line 180 of file wcsv_ntuple.

◆ m_ref

template<class T >
const std::vector<T>& tools::wcsv::ntuple::std_vector_column< T >::m_ref
protected

Definition at line 181 of file wcsv_ntuple.

◆ m_vec_sep

template<class T >
char tools::wcsv::ntuple::std_vector_column< T >::m_vec_sep
protected

Definition at line 182 of file wcsv_ntuple.

◆ m_writer

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

Definition at line 179 of file wcsv_ntuple.


The documentation for this class was generated from the following file:
tools::wcsv::ntuple::std_vector_column::m_vec_sep
char m_vec_sep
Definition: wcsv_ntuple:182
tools::wcsv::ntuple::std_vector_column::m_name
std::string m_name
Definition: wcsv_ntuple:180
tools::wcsv::ntuple::std_vector_column::m_writer
std::ostream & m_writer
Definition: wcsv_ntuple:179
tools::wcsv::ntuple::std_vector_column::id_class
static cid id_class()
Definition: wcsv_ntuple:134
tools::wcsv::ntuple::std_vector_column::m_ref
const std::vector< T > & m_ref
Definition: wcsv_ntuple:181