EventHandler.h
Go to the documentation of this file.
1 
20 #ifndef EVENTHANDLER_H_2801243E
21 #define EVENTHANDLER_H_2801243E
22 
23 #include "uscxml/Common.h"
24 #include "uscxml/messages/Event.h"
25 
26 #include <list>
27 #include <string>
28 #include <memory>
29 
30 namespace uscxml {
31 
32 class InterpreterImpl;
33 
41 class USCXML_API EventHandlerImpl {
42 public:
43  EventHandlerImpl() {}
44  virtual ~EventHandlerImpl() {}
45 
49  virtual std::list<std::string> getNames() = 0;
50 
55  virtual Data getDataModelVariables() = 0;
56 };
57 
63 class USCXML_API EventHandler {
64 public:
66 
68  virtual std::list<std::string> getNames() {
69  return _impl->getNames();
70  }
71 
73  virtual Data getDataModelVariables() const {
74  return _impl->getDataModelVariables();
75  };
76 
77 protected:
78  std::shared_ptr<EventHandlerImpl> _impl;
79  friend class InterpreterImpl;
80 };
81 
82 
83 }
84 
85 
86 #endif /* end of include guard: EVENTHANDLER_H_2801243E */
Definition: EventHandler.h:63
Definition: Breakpoint.cpp:26
virtual std::list< std::string > getNames()
Return a list of names for types we implement.
Definition: EventHandler.h:68
#define PIMPL_OPERATORS(type)
The usual operators as required for the PIMPL pattern.
Definition: Common.h:68
Common base class for invokers and i/o processors.
Definition: EventHandler.h:41
Definition: InterpreterImpl.h:51
virtual Data getDataModelVariables() const
Export a Data object for the `_x['name']` data-model namespace.
Definition: EventHandler.h:73
Definition: Data.h:44