3 //==========================================================================
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
9 //==========================================================================
11 #ifndef ACE_AUTO_EVENT_H
12 #define ACE_AUTO_EVENT_H
13 #include /**/ "ace/pre.h"
15 #include /**/ "ace/ACE_export.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "ace/Event.h"
23 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
26 * @class ACE_Auto_Event
30 * Specialization of Event mechanism which wakes up one waiting
31 * thread on @c signal. All platforms support process-scope locking
32 * support. However, only Win32 platforms support global naming and
33 * system-scope locking support.
35 template <class TIME_POLICY
= ACE_System_Time_Policy
>
36 class ACE_Auto_Event_T
: public ACE_Event_T
<TIME_POLICY
>
39 /// Constructor which will create auto event
40 ACE_Auto_Event_T (int initial_state
= 0,
41 int type
= USYNC_THREAD
,
45 #if defined (ACE_HAS_WCHAR)
46 /// Constructor which will create auto event (wchar_t version)
47 ACE_Auto_Event_T (int initial_state
,
51 #endif /* ACE_HAS_WCHAR */
54 virtual ~ACE_Auto_Event_T () = default;
56 /// Dump the state of an object.
59 /// Declare the dynamic allocation hooks
60 ACE_ALLOC_HOOK_DECLARE
;
63 class ACE_Auto_Event
:
64 public ACE_Auto_Event_T
<ACE_System_Time_Policy
>
67 /// Constructor which will create auto event
68 ACE_Auto_Event (int initial_state
= 0,
69 int type
= USYNC_THREAD
,
72 : ACE_Auto_Event_T
<ACE_System_Time_Policy
> (initial_state
, type
, name
, arg
)
76 #if defined (ACE_HAS_WCHAR)
77 /// Constructor which will create auto event (wchar_t version)
78 ACE_Auto_Event (int initial_state
,
82 : ACE_Auto_Event_T
<ACE_System_Time_Policy
> (initial_state
, type
, name
, arg
)
85 #endif /* ACE_HAS_WCHAR */
88 virtual ~ACE_Auto_Event ()
93 ACE_END_VERSIONED_NAMESPACE_DECL
95 #include "ace/Auto_Event.cpp"
97 #include /**/ "ace/post.h"
98 #endif /* ACE_AUTO_EVENT_H */