The Gaudi Framework  v33r1 (b1225454)
IPartitionControl.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_IPARTITIONCONTROL_H
12 #define GAUDIKERNEL_IPARTITIONCONTROL_H
13 
14 // Framework include files
15 #include "GaudiKernel/IInterface.h"
16 
17 // C++ include files
18 #include <string>
19 
76 class GAUDI_API IPartitionControl : virtual public IInterface {
77 public:
80 
82 
93  virtual StatusCode create( const std::string& name, const std::string& type ) = 0;
94 
96 
108  virtual StatusCode create( const std::string& name, const std::string& type, IInterface*& pPartition ) = 0;
109 
111 
119  virtual StatusCode drop( const std::string& name ) = 0;
120 
122 
132  virtual StatusCode drop( IInterface* pPartition ) = 0;
133 
135 
145  virtual StatusCode activate( const std::string& name ) = 0;
146 
148 
161  virtual StatusCode activate( IInterface* pPartition ) = 0;
162 
164 
171  virtual StatusCode get( const std::string& name, IInterface*& pPartition ) const = 0;
172 
174 
181  virtual StatusCode activePartition( std::string& name, IInterface*& pPartition ) const = 0;
182 
183  // Return codes:
184  enum class Status : StatusCode::code_t { PARTITION_NOT_PRESENT = 2, PARTITION_EXISTS = 4, NO_ACTIVE_PARTITION = 6 };
185 };
186 
188 
189 #endif // GAUDIKERNEL_IPARTITIONCONTROL_H
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
STL class.
#define STATUSCODE_ENUM_DECL(ENUM)
Declare an enum to be used as StatusCode value.
Definition: StatusCode.h:337
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
Definition of the basic interface.
Definition: IInterface.h:254
Status
Return status.
Definition: IInterface.h:307
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:23
Create / access partitions.
#define GAUDI_API
Definition: Kernel.h:81
unsigned long code_t
type of StatusCode value
Definition: StatusCode.h:67