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

Public Member Functions

virtual const std::string & store_cls () const
 
virtual bool visit (iobj_const_visitor &a_v) const
 
 BaseHistogram (const HIST &a_hist)
 
virtual ~BaseHistogram ()
 
- 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
 

Detailed Description

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

Definition at line 328 of file osc_streamers.

Constructor & Destructor Documentation

◆ BaseHistogram()

template<class HIST >
tools::osc::BaseHistogram< HIST >::BaseHistogram ( const HIST &  a_hist)
inline

Definition at line 359 of file osc_streamers.

359 :m_hist(a_hist){}

◆ ~BaseHistogram()

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

Definition at line 360 of file osc_streamers.

360 {}

Member Function Documentation

◆ cast()

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

Implements tools::istorable.

Definition at line 332 of file osc_streamers.

332  {
333  if(void* p = cmp_cast<BaseHistogram>(this,a_class)) return p;
334  return 0;
335  }

◆ s_visit()

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

Definition at line 352 of file osc_streamers.

352  {
353  const BaseHistogram* local =
354  safe_cast<istorable,BaseHistogram>(a_o);
355  if(!local) return false;
356  return local->BaseHistogram::visit(a_v); //IMPORTANT : have BaseHistogram::
357  }

◆ store_cls()

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

Implements tools::istorable.

Definition at line 337 of file osc_streamers.

337 {return s_base_histogram();}

◆ visit()

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

Implements tools::istorable.

Definition at line 338 of file osc_streamers.

338  {
339  if(!a_v.begin(*this,s_base_histogram(),BaseHistogram::s_visit)) return false;
340 
341  int version = 1;
342  if(!a_v.visit("fVersion",version)) return false;
343 
344  Annotation ano;
345  map2vec(m_hist.annotations(),ano.m_items);
346  if(!a_v.visit("fAnnotation",ano)) return false;
347 
348  if(!a_v.end(*this)) return false;
349  return true;
350  }

Member Data Documentation

◆ m_hist

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

Definition at line 367 of file osc_streamers.


The documentation for this class was generated from the following file:
tools::osc::BaseHistogram::m_hist
const HIST & m_hist
Definition: osc_streamers:367
tools::osc::BaseHistogram::BaseHistogram
BaseHistogram(const HIST &a_hist)
Definition: osc_streamers:359
tools::osc::map2vec
void map2vec(const std::map< std::string, std::string > &a_in, std::vector< Item > &a_out)
Definition: osc_streamers:317
tools::version
unsigned int version()
Definition: version:14
tools::osc::s_base_histogram
const std::string & s_base_histogram()
Definition: osc_streamers:32
tools::osc::BaseHistogram::s_visit
static bool s_visit(const istorable &a_o, iobj_const_visitor &a_v)
Definition: osc_streamers:352