Updated logging to include the class/method so that it is more obvious where these...
[ACE_TAO.git] / TAO / tao / LF_Event.inl
blobf47b63d0b67f3c7a525fb335c06af3230eac199e
1 // -*- C++ -*-
2 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
4 ACE_INLINE int
5 TAO_LF_Event::bind (TAO_LF_Follower *follower)
7   if (this->follower_ != 0)
8     return -1;
9   this->follower_ = follower;
10   return 0;
13 ACE_INLINE int
14 TAO_LF_Event::unbind (TAO_LF_Follower *)
16   if (this->follower_ == 0)
17     return -1;
18   this->follower_ = 0;
19   return 0;
22 ACE_INLINE void
23 TAO_LF_Event::reset_state (LFS_STATE new_state)
25   this->state_ = new_state;
28 ACE_INLINE bool
29 TAO_LF_Event::keep_waiting_i () const
31   return (!this->successful_i ()) && (!this->error_detected_i ());
34 ACE_INLINE const char *
35 TAO_LF_Event::state_name (LFS_STATE st)
37 #define TAO_LF_EVENT_ENTRY(X) case X: return #X
38   switch (st)
39     {
40       TAO_LF_EVENT_ENTRY (LFS_IDLE);
41       TAO_LF_EVENT_ENTRY (LFS_ACTIVE);
42       TAO_LF_EVENT_ENTRY (LFS_CONNECTION_WAIT);
43       TAO_LF_EVENT_ENTRY (LFS_SUCCESS);
44       TAO_LF_EVENT_ENTRY (LFS_FAILURE);
45       TAO_LF_EVENT_ENTRY (LFS_TIMEOUT);
46       TAO_LF_EVENT_ENTRY (LFS_CONNECTION_CLOSED);
47     }
48   return "***Unknown enum value, update TAO_LF_Event::state_name()";
49 #undef TAO_LF_EVENT_ENTRY
52 TAO_END_VERSIONED_NAMESPACE_DECL