8 #ifndef OPENDDS_DCPS_DISPATCH_SERVICE_H 9 #define OPENDDS_DCPS_DISPATCH_SERVICE_H 31 T&
ref = *
static_cast<T*
>(arg);
39 static const bool DS_SUCCESS =
true;
42 static const bool DS_ERROR =
false;
48 static const long TI_FAILURE = -1;
50 typedef void (*FunPtr)(
void*);
68 void shutdown(
bool immediate =
false, EventQueue* pending = 0);
76 DispatchStatus dispatch(FunPtr fun,
void* arg = 0);
82 return dispatch(fun_ptr_proxy<T>, &ref);
98 return schedule(fun_ptr_proxy<T>, &ref, expiration);
107 size_t cancel(TimerId
id,
void** arg = 0);
115 size_t cancel(FunPtr fun,
void* arg = 0);
118 template <
typename T>
121 return cancel(fun_ptr_proxy<T>, &ref);
126 static ACE_THR_FUNC_RETURN run(
void* arg);
127 void run_event_loop();
131 typedef OPENDDS_MAP(TimerId, TimerQueueMap::iterator) TimerIdMap;
152 #endif // OPENDDS_DCPS_DISPATCH_SERVICE_H ConditionVariable< ACE_Thread_Mutex > cv_
RcHandle< DispatchService > DispatchService_rch
#define OpenDDS_Dcps_Export
std::pair< FunArgPair, TimerId > TimerPair
long TimerId
Typedef for Schedule Return Values.
std::pair< FunPtr, void * > FunArgPair
#define OPENDDS_MULTIMAP(K, T)
reference_wrapper< T > ref(T &r)
static TimePoint_T< MonotonicClock > now()
bool DispatchStatus
Typedef for Dispatch Return Values.
DispatchStatus dispatch(T &ref)
Helper function to dispatch arbitrary function objects (see fun_ptr_proxy)
TimerQueueMap timer_queue_map_
TimerId schedule(T &ref, const MonotonicTimePoint &expiration=MonotonicTimePoint::now())
Helper function to schedule arbitrary function objects (see fun_ptr_proxy)
size_t cancel(T &ref)
Helper function to cancel arbitrary function objects (see fun_ptr_proxy)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
static void fun_ptr_proxy(void *arg)
Helper function for adapting arbitrary function objects (with operator())
int shutdown(ACE_HANDLE handle, int how)
The Internal API and Implementation of OpenDDS.
typedef OPENDDS_MAP(OPENDDS_STRING, OPENDDS_STRING) ValueMap
Helper types and functions for config file parsing.