ATLAS Offline Software
IPyComponent.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // IPyComponent.h
8 // Header file for class IPyComponent
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef ATHENAPYTHON_IPYCOMPONENT_H
12 #define ATHENAPYTHON_IPYCOMPONENT_H
13 
17 // STL includes
18 #include <string>
19 
20 // FrameWork includes
21 #include "GaudiKernel/INamedInterface.h"
22 
23 // AthenaPython includes
24 
25 // fwd declares
26 struct _object;
27 typedef _object PyObject;
28 namespace PyAthena { class PyComponentMgr; }
29 
30 class IPyComponent : virtual public INamedInterface
31 {
32  friend class PyAthena::PyComponentMgr; // for access to setPyAttr
33 
34  public:
36 
39  virtual ~IPyComponent() = default;
40 
41 
46  virtual const char* typeName() const = 0;
47 
48 
51  virtual PyObject* self() =0;
52 
53  protected:
56  virtual bool setPyAttr( PyObject* pyobj ) = 0;
57 
58 };
59 
60 
61 #endif //> ATHENAPYTHON_IPYCOMPONENT_H
IPyComponent::DeclareInterfaceID
DeclareInterfaceID(IPyComponent, 1, 0)
IPyComponent::typeName
virtual const char * typeName() const =0
return the std::type_info name of the underlying py-component This is used by concrete implementation...
IPyComponent::setPyAttr
virtual bool setPyAttr(PyObject *pyobj)=0
attach the C++ component to its python cousin
IPyComponent
Definition: IPyComponent.h:31
IPyComponent::~IPyComponent
virtual ~IPyComponent()=default
Destructor:
PyAthena
Definition: IPyComponent.h:28
PyObject
_object PyObject
Definition: IPyComponent.h:26
PyAthena::PyComponentMgr
Definition: PyComponentMgr.h:37