OpenDDS  Snapshot(2023/04/28-20:55)
Task.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef OPENDDS_DCPS_RTPS_ICE_TASK_H
9 #define OPENDDS_DCPS_RTPS_ICE_TASK_H
10 
11 #if !defined (ACE_LACKS_PRAGMA_ONCE)
12 #pragma once
13 #endif /* ACE_LACKS_PRAGMA_ONCE */
14 
15 #include "dds/DCPS/RcObject.h"
16 #include "dds/DCPS/TimeTypes.h"
18 
19 #include <ace/Time_Value.h>
20 
22 
23 namespace OpenDDS {
24 namespace ICE {
25 
26 class AgentImpl;
27 
28 struct Task : public DCPS::RcObject {
29  explicit Task(AgentImpl* a_agent_impl) : agent_impl_(a_agent_impl) {}
30  virtual ~Task() {};
31  virtual void execute(const DCPS::MonotonicTimePoint& a_now) = 0;
32  void enqueue(const DCPS::MonotonicTimePoint& release_time);
33 private:
34  friend class AgentImpl;
36 };
37 
40 
41 } // namespace ICE
42 } // namespace OpenDDS
43 
45 
46 #endif /* OPENDDS_RTPS_ICE_TASK_H */
DCPS::RcHandle< Task > TaskPtr
Definition: Task.h:38
Task(AgentImpl *a_agent_impl)
Definition: Task.h:29
void enqueue(const DCPS::MonotonicTimePoint &release_time)
Definition: Task.cpp:19
virtual ~Task()
Definition: Task.h:30
virtual void execute(const DCPS::MonotonicTimePoint &a_now)=0
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
AgentImpl * agent_impl_
Definition: Task.h:35
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
DCPS::WeakRcHandle< Task > WeakTaskPtr
Definition: Task.h:39