All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IAlgContextSvc.h
Go to the documentation of this file.
1 // $Id: IAlgContextSvc.h,v 1.2 2007/05/24 13:48:50 hmd Exp $
2 // ============================================================================
3 // CVS tag $Name: $, version $Revision: 1.2 $
4 // ============================================================================
5 #ifndef GAUDIKERNEL_IALGCONTEXTSVC_H
6 #define GAUDIKERNEL_IALGCONTEXTSVC_H
7 // ============================================================================
8 // Include files:
9 // ============================================================================
10 // STD & STL
11 // ============================================================================
12 #include <vector>
13 // ============================================================================
14 // GaudiKernel
15 // ============================================================================
16 #include "GaudiKernel/IInterface.h"
17 // ============================================================================
18 // Forward declarations
19 // ============================================================================
20 class IAlgorithm ;
21 // ============================================================================
28 class GAUDI_API IAlgContextSvc: virtual public IInterface
29 {
30 public:
34  typedef std::vector<IAlgorithm*> Algorithms ;
35 public:
37  virtual StatusCode setCurrentAlg ( IAlgorithm* a ) = 0 ;
39  virtual StatusCode unSetCurrentAlg ( IAlgorithm* a ) = 0 ;
41  virtual IAlgorithm* currentAlg () const = 0 ;
43  virtual const Algorithms& algorithms () const = 0 ;
44 protected:
46  virtual ~IAlgContextSvc() ;
47 } ;
48 // ============================================================================
49 namespace Gaudi
50 {
51  namespace Utils
52  {
85  {
86  public:
95  ( IAlgContextSvc* svc ,
96  IAlgorithm* alg ) ;
104  AlgContext
105  ( IAlgorithm* alg ,
106  IAlgContextSvc* svc ) ;
112  ~AlgContext() ;
113  private:
114  // default constructor is disabled
115  AlgContext() ;
116  // copy constructor is disabled
117  AlgContext ( const AlgContext& right ) ;
118  // assignement operator is disabled
119  AlgContext& operator=( const AlgContext& right ) ;
120  private:
123  };
124  } // end of namespace Gaudi::Utils
125 } // end of namespace Gaudi
126 // ============================================================================
127 // The END
128 // ============================================================================
129 #endif // GAUDIKERNEL_IALGCONTEXTSVC_H
130 // ============================================================================
131 
132 
Helper "sentry" class to automatize the safe register/unregister the algorithm's context.
std::vector< IAlgorithm * > Algorithms
the actual type of algorithm' stack
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Definition of the basic interface.
Definition: IInterface.h:160
#define DeclareInterfaceID(name, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:23
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:20
An abstract interface for Algorithm Context Service.
IAlgContextSvc * m_svc
This is a number of static methods for bootstrapping the Gaudi framework.
Definition: Bootstrap.h:15
#define GAUDI_API
Definition: Kernel.h:108