ServiceHistory Class Reference

ServiceHistory class definition. More...

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/996/GAUDI/GAUDI_v26r4/InstallArea/x86_64-slc6-gcc48-opt/include/GaudiKernel/ServiceHistory.h>

Inheritance diagram for ServiceHistory:
Collaboration diagram for ServiceHistory:

Public Member Functions

 ServiceHistory ()
 
 ServiceHistory (const IService *, const JobHistory *)
 
 ServiceHistory (const IService &, const JobHistory *)
 
virtual ~ServiceHistory ()=default
 
virtual const CLIDclID () const
 Retrieve reference to class definition structure. More...
 
const PropertyListproperties () const
 
const IServiceservice () const
 
const JobHistoryjobHistory () const
 
void dump (std::ostream &, const bool isXML=false, int indent=0) const
 
const std::string & name () const
 
const std::string & type () const
 
const std::string & version () const
 
 ServiceHistory ()
 
 ServiceHistory (const IService *, const JobHistory *)
 
 ServiceHistory (const IService &, const JobHistory *)
 
virtual ~ServiceHistory ()=default
 
virtual const CLIDclID () const
 Retrieve reference to class definition structure. More...
 
const PropertyListproperties () const
 
const IServiceservice () const
 
const JobHistoryjobHistory () const
 
void dump (std::ostream &, const bool isXML=false, int indent=0) const
 
const std::string & name () const
 
const std::string & type () const
 
const std::string & version () const
 
- Public Member Functions inherited from HistoryObj
 HistoryObj ()=default
 
virtual ~HistoryObj ()=default
 
 HistoryObj ()=default
 
virtual ~HistoryObj ()=default
 
- Public Member Functions inherited from DataObject
 DataObject ()
 Standard Constructor. More...
 
 DataObject (const DataObject &rhs)
 Copy Constructor. More...
 
DataObjectoperator= (const DataObject &rhs)
 Assignment Operator. More...
 
 DataObject (DataObject &&rhs)
 Move Constructor. More...
 
DataObjectoperator= (DataObject &&rhs)
 Move Assignment Operator. More...
 
virtual ~DataObject ()
 Standard Destructor. More...
 
virtual unsigned long addRef ()
 Add reference to object. More...
 
virtual unsigned long release ()
 release reference to object More...
 
const std::string & name () const
 Retreive DataObject name. It is the name when registered in the store. More...
 
virtual StatusCode update ()
 Provide empty placeholder for internal object reconfiguration callback. More...
 
 DataObject ()
 Standard Constructor. More...
 
 DataObject (const DataObject &rhs)
 Copy Constructor. More...
 
DataObjectoperator= (const DataObject &rhs)
 Assignment Operator. More...
 
 DataObject (DataObject &&rhs)
 Move Constructor. More...
 
DataObjectoperator= (DataObject &&rhs)
 Move Assignment Operator. More...
 
virtual ~DataObject ()
 Standard Destructor. More...
 
virtual unsigned long addRef ()
 Add reference to object. More...
 
virtual unsigned long release ()
 release reference to object More...
 
const std::string & name () const
 Retreive DataObject name. It is the name when registered in the store. More...
 
virtual StatusCode update ()
 Provide empty placeholder for internal object reconfiguration callback. More...
 
void setRegistry (IRegistry *pRegistry)
 Set pointer to Registry. More...
 
IRegistryregistry () const
 Get pointer to Registry. More...
 
LinkManagerlinkMgr () const
 Retrieve Link manager. More...
 
unsigned char version () const
 Retrieve version number of this object representation. More...
 
void setVersion (unsigned char vsn)
 Set version number of this object representation. More...
 
unsigned long refCount () const
 Return the refcount. More...
 
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the output stream (ASCII) More...
 
void setRegistry (IRegistry *pRegistry)
 Set pointer to Registry. More...
 
IRegistryregistry () const
 Get pointer to Registry. More...
 
LinkManagerlinkMgr () const
 Retrieve Link manager. More...
 
unsigned char version () const
 Retrieve version number of this object representation. More...
 
void setVersion (unsigned char vsn)
 Set version number of this object representation. More...
 
unsigned long refCount () const
 Return the refcount. More...
 
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the output stream (ASCII) More...
 
- Public Member Functions inherited from IVersHistoryObj
virtual ~IVersHistoryObj ()=default
 
virtual ~IVersHistoryObj ()=default
 

Static Public Member Functions

static const CLIDclassID ()
 
static const CLIDclassID ()
 
- Static Public Member Functions inherited from HistoryObj
static const CLIDclassID ()
 
static std::string convert_string (const std::string &)
 
static const CLIDclassID ()
 
static std::string convert_string (const std::string &)
 
- Static Public Member Functions inherited from DataObject
static const CLIDclassID ()
 Retrieve reference to class definition structure (static access) More...
 
static const CLIDclassID ()
 Retrieve reference to class definition structure (static access) More...
 

Private Attributes

const IServicem_pService
 
const JobHistorym_jobHistory
 
std::string m_name
 
std::string m_type
 
std::string m_version
 
PropertyList m_properties
 

Additional Inherited Members

- Public Types inherited from IVersHistoryObj
typedef std::vector< Property * > PropertyList
 
typedef std::vector< Property * > PropertyList
 
- Protected Member Functions inherited from HistoryObj
virtual void indent (std::ostream &, int) const
 
virtual void indent (std::ostream &, int) const
 

Detailed Description

ServiceHistory class definition.

Author
: Charles Leggett

Definition at line 22 of file ServiceHistory.h.

Constructor & Destructor Documentation

ServiceHistory::ServiceHistory ( )

Definition at line 25 of file ServiceHistory.cpp.

25  :
26  // HistoryObj(),
27  m_pService(nullptr),
28  m_name("none"),
29  m_type("none"),
30  m_version("none")
31 {
32 
33 }
const IService * m_pService
std::string m_name
std::string m_type
std::string m_version
ServiceHistory::ServiceHistory ( const IService isv,
const JobHistory job 
)

Definition at line 37 of file ServiceHistory.cpp.

37  :
38  // HistoryObj(),
39  m_pService(isv),
40  m_jobHistory(job),
41  m_name(isv->name()),
42  m_version("none")
43 {
44 
45  const Service *svc = dynamic_cast<const Service*>(isv);
46  m_type = System::typeinfoName(typeid(*svc));
47  m_properties = svc->getProperties();
48 
49 }
const IService * m_pService
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
std::string m_name
PropertyList m_properties
const std::vector< Property * > & getProperties() const override
Definition: Service.cpp:354
std::string m_type
const JobHistory * m_jobHistory
std::string m_version
Base class for all services.
Definition: Service.h:33
ServiceHistory::ServiceHistory ( const IService isv,
const JobHistory job 
)

Definition at line 54 of file ServiceHistory.cpp.

54  :
55  // HistoryObj(),
56  m_pService(&isv),
57  m_jobHistory(job),
58  m_name(isv.name()),
59  m_version("none")
60 {
61 
62  const Service *svc = dynamic_cast<const Service*>(&isv);
63  m_type = System::typeinfoName(typeid(*svc));
64  m_properties = svc->getProperties();
65 
66 }
const IService * m_pService
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
std::string m_name
PropertyList m_properties
const std::vector< Property * > & getProperties() const override
Definition: Service.cpp:354
std::string m_type
const JobHistory * m_jobHistory
std::string m_version
Base class for all services.
Definition: Service.h:33
virtual ServiceHistory::~ServiceHistory ( )
virtualdefault
ServiceHistory::ServiceHistory ( )
ServiceHistory::ServiceHistory ( const IService ,
const JobHistory  
)
ServiceHistory::ServiceHistory ( const IService ,
const JobHistory  
)
virtual ServiceHistory::~ServiceHistory ( )
virtualdefault

Member Function Documentation

const CLID & ServiceHistory::classID ( )
static

Definition at line 71 of file ServiceHistory.cpp.

71  {
72 
73  static const CLID CLID_ServiceHistory = 187225489; // from `clid ServiceHistory`
74  return CLID_ServiceHistory;
75 
76 }
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
static const CLID& ServiceHistory::classID ( )
static
virtual const CLID& ServiceHistory::clID ( ) const
inlinevirtual

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 32 of file ServiceHistory.h.

32 { return classID(); }
static const CLID & classID()
virtual const CLID& ServiceHistory::clID ( ) const
inlinevirtual

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 32 of file ServiceHistory.h.

32 { return classID(); }
static const CLID & classID()
void ServiceHistory::dump ( std::ostream &  ost,
const bool  isXML = false,
int  indent = 0 
) const
virtual

Implements HistoryObj.

Definition at line 81 of file ServiceHistory.cpp.

81  {
82 
83  if (!isXML) {
84 
85  ost << "Name: " << name() << endl;
86  ost << "Type: " << type() << endl;
87  ost << "Version: " << version() << endl;
88 
89  //Properties
90  ost << "Properties: [" << endl;
91 
92  for ( const auto& ipprop : properties() ) {
93  const Property& prop = *ipprop;
94  prop.fillStream(ost);
95  ost << endl;
96  }
97  ost << "]" << endl;
98 
99  } else {
100 
101  ind += 2;
102  indent(ost,ind);
103  ost << "<COMPONENT name=\"" << name()
104  << "\" class=\"" << convert_string(type())
105  << "\" version=\"" << convert_string(version())
106  << "\">" << endl;
107 
108  for ( const auto& ipprop : properties() ) {
109  const Property& prop = *ipprop;
110 
111  indent(ost,ind+2);
112  ost << "<PROPERTY name=\"" << prop.name()
113  << "\" value=\"" << convert_string(prop.toString())
114  << "\" documentation=\"" << convert_string(prop.documentation())
115  << "\">" << endl;
116  }
117 
118  indent(ost,ind);
119  ost << "</COMPONENT>" << endl;
120 
121  }
122 
123 }
virtual std::string toString() const =0
value -> string
const std::string & name() const
const std::string & name() const
property name
Definition: Property.h:45
const std::string & documentation() const
property documentation
Definition: Property.h:47
virtual std::ostream & fillStream(std::ostream &) const
the printout of the property value
Definition: Property.cpp:109
const std::string & version() const
const std::string & type() const
virtual void indent(std::ostream &, int) const
Definition: HistoryObj.cpp:43
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
const PropertyList & properties() const
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:21
void ServiceHistory::dump ( std::ostream &  ,
const bool  isXML = false,
int  indent = 0 
) const
virtual

Implements HistoryObj.

const JobHistory* ServiceHistory::jobHistory ( ) const
inline

Definition at line 40 of file ServiceHistory.h.

40 { return m_jobHistory; }
const JobHistory * m_jobHistory
const JobHistory* ServiceHistory::jobHistory ( ) const
inline

Definition at line 40 of file ServiceHistory.h.

40 { return m_jobHistory; }
const JobHistory * m_jobHistory
const std::string& ServiceHistory::name ( ) const
inlinevirtual

Implements IVersHistoryObj.

Definition at line 44 of file ServiceHistory.h.

44 { return m_name; }
std::string m_name
const std::string& ServiceHistory::name ( ) const
inlinevirtual

Implements IVersHistoryObj.

Definition at line 44 of file ServiceHistory.h.

44 { return m_name; }
std::string m_name
const PropertyList& ServiceHistory::properties ( ) const
inlinevirtual

Implements IVersHistoryObj.

Definition at line 36 of file ServiceHistory.h.

36 { return m_properties; }
PropertyList m_properties
const PropertyList& ServiceHistory::properties ( ) const
inlinevirtual

Implements IVersHistoryObj.

Definition at line 36 of file ServiceHistory.h.

36 { return m_properties; }
PropertyList m_properties
const IService* ServiceHistory::service ( ) const
inline

Definition at line 38 of file ServiceHistory.h.

38 { return m_pService; }
const IService * m_pService
const IService* ServiceHistory::service ( ) const
inline

Definition at line 38 of file ServiceHistory.h.

38 { return m_pService; }
const IService * m_pService
const std::string& ServiceHistory::type ( ) const
inlinevirtual

Implements IVersHistoryObj.

Definition at line 45 of file ServiceHistory.h.

45 { return m_type; }
std::string m_type
const std::string& ServiceHistory::type ( ) const
inlinevirtual

Implements IVersHistoryObj.

Definition at line 45 of file ServiceHistory.h.

45 { return m_type; }
std::string m_type
const std::string& ServiceHistory::version ( ) const
inlinevirtual

Implements IVersHistoryObj.

Definition at line 46 of file ServiceHistory.h.

46 { return m_version; }
std::string m_version
const std::string& ServiceHistory::version ( ) const
inlinevirtual

Implements IVersHistoryObj.

Definition at line 46 of file ServiceHistory.h.

46 { return m_version; }
std::string m_version

Member Data Documentation

const JobHistory * ServiceHistory::m_jobHistory
private

Definition at line 52 of file ServiceHistory.h.

std::string ServiceHistory::m_name
private

Definition at line 53 of file ServiceHistory.h.

PropertyList ServiceHistory::m_properties
private

Definition at line 54 of file ServiceHistory.h.

const IService * ServiceHistory::m_pService
private

Definition at line 51 of file ServiceHistory.h.

std::string ServiceHistory::m_type
private

Definition at line 53 of file ServiceHistory.h.

std::string ServiceHistory::m_version
private

Definition at line 53 of file ServiceHistory.h.


The documentation for this class was generated from the following files: