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

Public Member Functions

virtual const std::string & store_cls () const
 
virtual bool visit (iobj_const_visitor &a_v) const
 
 Profile (const PROF &a_hist, const std::string &a_cls)
 
virtual ~Profile ()
 
 Profile (const Profile &a_from)
 
Profileoperator= (const Profile &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 PROF & m_hist
 
std::string m_cls
 

Detailed Description

template<class PROF>
class tools::osc::Profile< PROF >

Definition at line 664 of file osc_streamers.

Constructor & Destructor Documentation

◆ Profile() [1/2]

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

Definition at line 695 of file osc_streamers.

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

◆ ~Profile()

template<class PROF >
virtual tools::osc::Profile< PROF >::~Profile ( )
inlinevirtual

Definition at line 697 of file osc_streamers.

697 {}

◆ Profile() [2/2]

template<class PROF >
tools::osc::Profile< PROF >::Profile ( const Profile< PROF > &  a_from)
inline

Definition at line 699 of file osc_streamers.

700  :istorable(a_from)
701  ,m_hist(a_from.m_hist)
702  ,m_cls(a_from.m_cls)
703  {}

Member Function Documentation

◆ cast()

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

Implements tools::istorable.

Definition at line 668 of file osc_streamers.

668  {
669  if(void* p = cmp_cast<Profile>(this,a_class)) return p;
670  return 0;
671  }

◆ operator=()

template<class PROF >
Profile& tools::osc::Profile< PROF >::operator= ( const Profile< PROF > &  a_from)
inline

Definition at line 704 of file osc_streamers.

704  {
705  m_cls = a_from.m_cls;
706  return *this;
707  }

◆ s_visit()

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

Definition at line 689 of file osc_streamers.

689  {
690  const Profile* local = safe_cast<istorable,Profile>(a_o);
691  if(!local) return false;
692  return local->Profile::visit(a_v); //IMPORTANT : have Profile::
693  }

◆ store_cls()

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

Implements tools::istorable.

Definition at line 673 of file osc_streamers.

673 {return m_cls;}

◆ visit()

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

Implements tools::istorable.

Definition at line 674 of file osc_streamers.

674  {
675  if(!a_v.begin(*this,m_cls,Profile::s_visit)) return false;
676 
677  int version = 1;
678  if(!a_v.visit("fVersion",version)) return false;
679 
680  BaseHistogram<PROF> bh(m_hist);
681  if(!bh.visit(a_v)) return false;
682 
683  if(!visitProfile(m_hist,a_v)) return false;
684 
685  if(!a_v.end(*this)) return false;
686  return true;
687  }

Member Data Documentation

◆ m_cls

template<class PROF >
std::string tools::osc::Profile< PROF >::m_cls
protected

Definition at line 710 of file osc_streamers.

◆ m_hist

template<class PROF >
const PROF& tools::osc::Profile< PROF >::m_hist
protected

Definition at line 709 of file osc_streamers.


The documentation for this class was generated from the following file:
tools::osc::visitProfile
bool visitProfile(const PROF &a_prof, iobj_const_visitor &a_visitor)
Definition: osc_streamers:629
tools::osc::Profile::s_visit
static bool s_visit(const istorable &a_o, iobj_const_visitor &a_v)
Definition: osc_streamers:689
tools::osc::Profile::m_hist
const PROF & m_hist
Definition: osc_streamers:709
tools::osc::Profile::m_cls
std::string m_cls
Definition: osc_streamers:710
tools::version
unsigned int version()
Definition: version:14
tools::osc::Profile::Profile
Profile(const PROF &a_hist, const std::string &a_cls)
Definition: osc_streamers:695