ATLAS Offline Software
Loading...
Searching...
No Matches
IPyComponent.h
Go to the documentation of this file.
1
2
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
16
17// STL includes
18#include <string>
19
20// FrameWork includes
21#include "GaudiKernel/INamedInterface.h"
22
23// AthenaPython includes
24
25// fwd declares
26struct _object;
27typedef _object PyObject;
28namespace PyAthena { class PyComponentMgr; }
29
30class 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
_object PyObject
virtual const char * typeName() const =0
return the std::type_info name of the underlying py-component This is used by concrete implementation...
virtual bool setPyAttr(PyObject *pyobj)=0
attach the C++ component to its python cousin
virtual PyObject * self()=0
return associated python object.
DeclareInterfaceID(IPyComponent, 1, 0)
virtual ~IPyComponent()=default
Destructor: