Loading [MathJax]/extensions/tex2jax.js
Free Electron
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
fe_signal.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __signal_fe_signal_h__
8 #define __signal_fe_signal_h__
9 
10 /** A proxy handler component for python derived handlers.
11  */
12 class PyHandler : public fe::HandlerI
13 {
14  public:
15  PyHandler(PyObject *pPyObject);
16 virtual ~PyHandler(void);
17 virtual void handle(fe::Record &signal);
18 virtual void bind(fe::sp<fe::SignalerI> spS, fe::sp<fe::Layout> spL);
19  private:
20  PyObject *m_pObject;
21 };
22 
23 /** The base class for HandlerFS to enable HandlerFS to be python derivable.
24  */
26 {
27  public:
28  HandlerBase(void);
29  HandlerBase(PyObject *pP);
30 virtual ~HandlerBase(void);
31 };
32 
33 /** HandlerI Function Set. This is for python exposure of both python and C++
34  derived handlers. C++ derived handler components must be derived from
35  fe::HandlerI.
36  */
37 class HandlerFS : public HandlerBase, public FunctionSet<fe::HandlerI>
38 {
39  public:
40  HandlerFS(PyObject *self_, PyObject *pP):
41  FunctionSet<fe::HandlerI>(pP) {}
42  HandlerFS(PyObject *self_);
43  PyObject *object(void);
44 virtual ~HandlerFS(void);
45 };
46 
47 
48 /** SignalerI Function Set.
49  */
50 class SignalerFS : public FunctionSet<fe::SignalerI>
51 {
52  public:
53  SignalerFS(PyObject *pP) : FunctionSet<fe::SignalerI>(pP) {};
54  void insert(HandlerFS &handlerPtr, const LayoutPtr &layoutPtr);
55  void remove(HandlerFS &handlerPtr, const LayoutPtr &layoutPtr);
56  void signal(PyObject *pRecord);
57  void dump(void);
58 };
59 
60 /** Parser Function Set.
61  */
62 class ParserFS : public FunctionSet<fe::ParserI>
63 {
64  public:
65  ParserFS(PyObject *pP) : FunctionSet<fe::ParserI>(pP) {};
66  void parse(PyObject *pTokens);
67 };
68 
69 /** SequencerI Function Set
70  */
71 class SequencerFS : public FunctionSet<fe::SequencerI>
72 {
73  public:
74  SequencerFS(PyObject *pP) : FunctionSet<fe::SequencerI>(pP) {};
75  U32 getCurrentTime(void);
76  void setTime( U32 counter);
77  PyObject *add( const LayoutPtr &layoutPtr,
78  U32 startTime,
79  U32 interval);
80  PyObject *lookup( const LayoutPtr &layoutPtr,
81  U32 interval);
82  bool remove( PyObject *record);
83 };
84 
85 #endif /* __signal_fe_signal_h__ */
86 
A proxy handler component for python derived handlers.
Definition: fe_signal.h:12
The base class for HandlerFS to enable HandlerFS to be python derivable.
Definition: fe_signal.h:25
SignalerI Function Set.
Definition: fe_signal.h:50
Parser Function Set.
Definition: fe_signal.h:62
SequencerI Function Set.
Definition: fe_signal.h:71
Reference to an instance of a Layout.
Definition: RecordSB.h:35
HandlerI Function Set.
Definition: fe_signal.h:37