Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Service Class Reference

Base class for all services. More...

#include <GaudiKernel/Service.h>

Inheritance diagram for Service:

IService IProperty IInterface IInterface ConversionSvc DataSvc List of all members.

Public Types

enum  State { OFFLINE, INITIALIZED }
 Define Service states. More...


Public Methods

virtual StatusCode queryInterface (const IID& riid, void** ppvUnknown)
 Query interfaces of Interface. More...

virtual unsigned long addRef ()
 Reference Interface instance. More...

virtual unsigned long release ()
 Release Interface instance. More...

virtual const std::string& name () const
 Retrieve name of the service. More...

virtual const IIDtype () const
 Retrieve ID of the Service. More...

State state ( ) const
 Retrieve state of the Service. More...

virtual StatusCode initialize ()
 Initilize Service. More...

virtual StatusCode finalize ()
 Finalize Service. More...

virtual StatusCode setProperty (const Property& p)
 Set the property by property. More...

virtual StatusCode setProperty ( std::istream& s )
 Set the property by istream. More...

virtual StatusCode setProperty ( const std::string& n, const std::string& v)
 Set the property by std::string. More...

virtual StatusCode getProperty (Property* p) const
 Get the property by property. More...

virtual const PropertygetProperty ( const std::string& name) const
 Get the property by name. More...

virtual StatusCode getProperty ( const std::string& n, std::string& v ) const
 Get the property by std::string. More...

virtual const std::vector<
Property*>& 
getProperties ( ) const
 Get list of properties. More...

 Service ( const std::string& name, ISvcLocator* svcloc)
 Standard Constructor. More...

ISvcLocatorserviceLocator () const
 Retrieve pointer to service locator. More...

IMessageSvcmsgSvc ()
 Retrieve pointer to message service. More...

IMessageSvcmsgSvc () const
IMessageSvcmessageService ()
IMessageSvcmessageService () const
StatusCode setProperties ()
 Method for setting declared properties to the values specifed for the job. More...

template<classT> StatusCode service ( const std::string& name, T*& svc, bool createIf = false ) const
 Access a service by name, creating it if it doesn't already exist. More...

template<classT> StatusCode declareProperty ( const std::string& name, T& property ) const
 Declare named properties. More...


Protected Methods

virtual ~Service ()
 Standard Destructor. More...


Protected Attributes

int m_outputLevel
 Service output level. More...


Private Attributes

std::string m_name
 Service Name. More...

unsigned long m_refCount
 Reference counter. More...

ISvcLocatorm_svcLocator
 Service Locator reference. More...

IMessageSvcm_messageSvc
 MessageSvc reference. More...

IJobOptions* m_jobOptions
 JobOptions reference. More...

State m_state
 Service state. More...

PropertyMgrm_propertyMgr
 Property Manager. More...


Detailed Description

Base class for all services.

It implements the IService and IProperty interfaces.

Author(s):
Pere Mato

Definition at line 23 of file Service.h.


Member Enumeration Documentation

enum Service::State
 

Define Service states.

Enumeration values:
OFFLINE  
INITIALIZED  

Definition at line 27 of file Service.h.


Constructor & Destructor Documentation

Service::Service ( const std::string & name,
ISvcLocator * svcloc )
 

Standard Constructor.

Definition at line 175 of file Service.cpp.

Service::~Service ( ) [protected, virtual]
 

Standard Destructor.

Definition at line 189 of file Service.cpp.


Member Function Documentation

unsigned long Service::addRef ( ) [virtual]
 

Reference Interface instance.

Reimplemented from IInterface.

Definition at line 28 of file Service.cpp.

Referenced by queryInterface(), DataSvc::queryInterface(), and ConversionSvc::queryInterface().

template<classT>
StatusCode Service::declareProperty ( const std::string & name,
T & property ) const [inline]
 

Declare named properties.

Definition at line 93 of file Service.h.

Referenced by DataSvc::DataSvc(), and Service().

StatusCode Service::finalize ( ) [virtual]
 

Finalize Service.

Reimplemented from IService.

Reimplemented in ConversionSvc, and DataSvc.

Definition at line 87 of file Service.cpp.

Referenced by DataSvc::finalize(), and ConversionSvc::finalize().

const std::vector< Property *>& Service::getProperties ( ) const [virtual]
 

Get list of properties.

Reimplemented from IProperty.

Definition at line 156 of file Service.cpp.

StatusCode Service::getProperty ( const std::string & n,
std::string & v ) const [virtual]
 

Get the property by std::string.

Reimplemented from IProperty.

Definition at line 152 of file Service.cpp.

const Property & Service::getProperty ( const std::string & n ) const [virtual]
 

Get the property by name.

Reimplemented from IProperty.

Definition at line 148 of file Service.cpp.

StatusCode Service::getProperty ( Property * p ) const [virtual]
 

Get the property by property.

Reimplemented from IProperty.

Definition at line 144 of file Service.cpp.

Referenced by AlgTool::AlgTool().

StatusCode Service::initialize ( ) [virtual]
 

Initilize Service.

Reimplemented from IService.

Reimplemented in ConversionSvc, and DataSvc.

Definition at line 62 of file Service.cpp.

Referenced by DataSvc::initialize(), and ConversionSvc::initialize().

IMessageSvc * Service::messageService ( ) const
 

Definition at line 126 of file Service.cpp.

IMessageSvc * Service::messageService ( )
 

Definition at line 123 of file Service.cpp.

IMessageSvc * Service::msgSvc ( ) const
 

Definition at line 119 of file Service.cpp.

IMessageSvc * Service::msgSvc ( )
 

Retrieve pointer to message service.

Definition at line 116 of file Service.cpp.

Referenced by AlgTool::AlgTool(), and ConversionSvc::createReps().

const std::string & Service::name ( ) const [virtual]
 

Retrieve name of the service.

Reimplemented from IService.

Definition at line 101 of file Service.cpp.

Referenced by ConversionSvc::createReps(), initialize(), DataSvc::loadObject(), setProperties(), and DataSvc::updateObject().

StatusCode Service::queryInterface ( const IID & riid,
void ** ppvInterface ) [virtual]
 

Query interfaces of Interface.

Parameters:
riid   ID of Interface to be retrieved
ppvUnknown   Pointer to Location for interface pointer

Reimplemented in ConversionSvc, and DataSvc.

Definition at line 43 of file Service.cpp.

Referenced by DataSvc::queryInterface(), and ConversionSvc::queryInterface().

unsigned long Service::release ( ) [virtual]
 

Release Interface instance.

Reimplemented from IInterface.

Definition at line 34 of file Service.cpp.

template<classT>
StatusCode Service::service ( const std::string & name,
T *& svc,
bool createIf = false ) const [inline]
 

Access a service by name, creating it if it doesn't already exist.

Definition at line 81 of file Service.h.

ISvcLocator * Service::serviceLocator ( ) const
 

Retrieve pointer to service locator.

Definition at line 111 of file Service.cpp.

Referenced by AlgTool::AlgTool(), ConversionSvc::createConverter(), ConversionSvc::initialize(), and service().

StatusCode Service::setProperties ( )
 

Method for setting declared properties to the values specifed for the job.

Definition at line 161 of file Service.cpp.

Referenced by initialize().

StatusCode Service::setProperty ( const std::string & n,
const std::string & v ) [virtual]
 

Set the property by std::string.

Reimplemented from IProperty.

Definition at line 140 of file Service.cpp.

StatusCode Service::setProperty ( std::istream & s ) [virtual]
 

Set the property by istream.

Reimplemented from IProperty.

Definition at line 136 of file Service.cpp.

StatusCode Service::setProperty ( const Property & p ) [virtual]
 

Set the property by property.

Reimplemented from IProperty.

Definition at line 132 of file Service.cpp.

State Service::state ( ) const [inline]
 

Retrieve state of the Service.

Definition at line 46 of file Service.h.

const IID & Service::type ( ) const [virtual]
 

Retrieve ID of the Service.

Reimplemented from IService.

Definition at line 106 of file Service.cpp.


Member Data Documentation

IJobOptions * Service::m_jobOptions [private]
 

JobOptions reference.

Definition at line 113 of file Service.h.

IMessageSvc * Service::m_messageSvc [private]
 

MessageSvc reference.

Definition at line 111 of file Service.h.

std::string Service::m_name [private]
 

Service Name.

Definition at line 105 of file Service.h.

int Service::m_outputLevel [protected]
 

Service output level.

Definition at line 102 of file Service.h.

PropertyMgr * Service::m_propertyMgr [private]
 

Property Manager.

Definition at line 117 of file Service.h.

unsigned long Service::m_refCount [private]
 

Reference counter.

Definition at line 107 of file Service.h.

State Service::m_state [private]
 

Service state.

Definition at line 115 of file Service.h.

ISvcLocator * Service::m_svcLocator [private]
 

Service Locator reference.

Definition at line 109 of file Service.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:22:15 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000