XmlRpcDispatch.h
Go to the documentation of this file.
1 #include "sick_scan/sick_scan_base.h" /* Base definitions included in all header files, added by add_sick_scan_base_header.py. Do not edit this line. */
2 
3 #ifndef _XMLRPCDISPATCH_H_
4 #define _XMLRPCDISPATCH_H_
5 //
6 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
7 //
8 #if defined(_MSC_VER)
9 # pragma warning(disable:4786) // identifier was truncated in debug info
10 #endif
11 
12 #include "xmlrpcpp/XmlRpcDecl.h"
13 
14 #ifndef MAKEDEPEND
15 # include <list>
16 #endif
17 
18 namespace XmlRpc {
19 
20  // An RPC source represents a file descriptor to monitor
21  class XmlRpcSource;
22 
25  class XMLRPCPP_DECL XmlRpcDispatch {
26  public:
28  XmlRpcDispatch();
29  ~XmlRpcDispatch();
30 
32  enum EventType {
33  ReadableEvent = 1,
34  WritableEvent = 2,
35  Exception = 4
36  };
37 
42  void addSource(XmlRpcSource* source, unsigned eventMask);
43 
46  void removeSource(XmlRpcSource* source);
47 
49  void setSourceEvents(XmlRpcSource* source, unsigned eventMask);
50 
51 
54  void work(double msTime);
55 
57  void exit();
58 
60  void clear();
61 
62  // helper
63  double getTime();
64 
65  // A source to monitor and what to monitor it for
66  struct MonitoredSource {
67  MonitoredSource(XmlRpcSource* src, unsigned mask) : _src(src), _mask(mask) {}
68  XmlRpcSource* getSource() const { return _src; }
69  unsigned& getMask() { return _mask; }
70  XmlRpcSource* _src;
71  unsigned _mask;
72  };
73 
74  // A list of sources to monitor
75  typedef std::list< MonitoredSource > SourceList;
76 
77  // Sources being monitored
78  SourceList _sources;
79  protected:
80 
81  // When work should stop (-1 implies wait forever, or until exit is called)
82  double _endTime;
83 
84  bool _doClear;
85  bool _inWork;
86 
87  };
88 } // namespace XmlRpc
89 
90 #endif // _XMLRPCDISPATCH_H_
XmlRpc
sick_scan_base.h
XMLRPCPP_DECL
#define XMLRPCPP_DECL
Definition: XmlRpcDecl.h:53


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:13