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

Public Member Functions

virtual const std::string & store_cls () const
 
virtual bool visit (iobj_const_visitor &a_v) const
 
 Histogram (const HIST &a_hist, const std::string &a_cls)
 
virtual ~Histogram ()
 
 Histogram (const Histogram &a_from)
 
Histogramoperator= (const Histogram &a_from)
 
- Public Member Functions inherited from tools::istorable
virtual ~istorable ()
 

Protected Member Functions

virtual void * cast (const std::string &a_class) const
 

Static Protected Member Functions

static bool s_visit (const istorable &a_o, iobj_const_visitor &a_v)
 

Protected Attributes

const HIST & m_hist
 
std::string m_cls
 

Detailed Description

template<class HIST>
class tools::osc::Histogram< HIST >

Definition at line 473 of file osc_streamers.

Constructor & Destructor Documentation

◆ Histogram() [1/2]

template<class HIST >
tools::osc::Histogram< HIST >::Histogram ( const HIST &  a_hist,
const std::string &  a_cls 
)
inline

Definition at line 504 of file osc_streamers.

505  :m_hist(a_hist),m_cls(a_cls){}

◆ ~Histogram()

template<class HIST >
virtual tools::osc::Histogram< HIST >::~Histogram ( )
inlinevirtual

Definition at line 506 of file osc_streamers.

506 {}

◆ Histogram() [2/2]

template<class HIST >
tools::osc::Histogram< HIST >::Histogram ( const Histogram< HIST > &  a_from)
inline

Definition at line 508 of file osc_streamers.

509  :istorable(a_from)
510  ,m_hist(a_from.m_hist)
511  ,m_cls(a_from.m_cls)
512  {}

Member Function Documentation

◆ cast()

template<class HIST >
virtual void* tools::osc::Histogram< HIST >::cast ( const std::string &  a_class) const
inlineprotectedvirtual

Implements tools::istorable.

Definition at line 477 of file osc_streamers.

477  {
478  if(void* p = cmp_cast<Histogram>(this,a_class)) return p;
479  return 0;
480  }

◆ operator=()

template<class HIST >
Histogram& tools::osc::Histogram< HIST >::operator= ( const Histogram< HIST > &  a_from)
inline

Definition at line 513 of file osc_streamers.

513  {
514  m_cls = a_from.m_cls;
515  return *this;
516  }

◆ s_visit()

template<class HIST >
static bool tools::osc::Histogram< HIST >::s_visit ( const istorable a_o,
iobj_const_visitor a_v 
)
inlinestaticprotected

Definition at line 498 of file osc_streamers.

498  {
499  const Histogram* local = safe_cast<istorable,Histogram>(a_o);
500  if(!local) return false;
501  return local->Histogram::visit(a_v); //IMPORTANT : have Histogram::
502  }

◆ store_cls()

template<class HIST >
virtual const std::string& tools::osc::Histogram< HIST >::store_cls ( ) const
inlinevirtual

Implements tools::istorable.

Definition at line 482 of file osc_streamers.

482 {return m_cls;}

◆ visit()

template<class HIST >
virtual bool tools::osc::Histogram< HIST >::visit ( iobj_const_visitor a_v) const
inlinevirtual

Implements tools::istorable.

Definition at line 483 of file osc_streamers.

483  {
484  if(!a_v.begin(*this,m_cls,Histogram::s_visit)) return false;
485 
486  int version = 1;
487  if(!a_v.visit("fVersion",version)) return false;
488 
489  BaseHistogram<HIST> bh(m_hist);
490  if(!bh.visit(a_v)) return false;
491 
492  if(!visitHistogram(m_hist,a_v)) return false;
493 
494  if(!a_v.end(*this)) return false;
495  return true;
496  }

Member Data Documentation

◆ m_cls

template<class HIST >
std::string tools::osc::Histogram< HIST >::m_cls
protected

Definition at line 519 of file osc_streamers.

◆ m_hist

template<class HIST >
const HIST& tools::osc::Histogram< HIST >::m_hist
protected

Definition at line 518 of file osc_streamers.


The documentation for this class was generated from the following file:
tools::osc::visitHistogram
bool visitHistogram(const HIST &a_hist, iobj_const_visitor &a_visitor)
Definition: osc_streamers:383
tools::osc::Histogram::m_hist
const HIST & m_hist
Definition: osc_streamers:518
tools::osc::Histogram::m_cls
std::string m_cls
Definition: osc_streamers:519
tools::version
unsigned int version()
Definition: version:14
tools::osc::Histogram::Histogram
Histogram(const HIST &a_hist, const std::string &a_cls)
Definition: osc_streamers:504
tools::osc::Histogram::s_visit
static bool s_visit(const istorable &a_o, iobj_const_visitor &a_v)
Definition: osc_streamers:498