2 #include "tao/orbconf.h" /* For POA_NO_TIMESTAMP definition. */
3 #include "ace/OS_NS_string.h"
5 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
9 namespace Portable_Server
11 ACE_INLINE CORBA::ULong
12 Creation_Time::creation_time_length ()
14 return 2 * sizeof (CORBA::ULong);
18 Creation_Time::Creation_Time (const ACE_Time_Value &creation_time)
20 this->time_stamp_[Creation_Time::SEC_FIELD] = (CORBA::ULong) creation_time.sec ();
21 this->time_stamp_[Creation_Time::USEC_FIELD] = (CORBA::ULong) creation_time.usec ();
25 Creation_Time::Creation_Time ()
27 this->time_stamp_[Creation_Time::SEC_FIELD] = 0;
28 this->time_stamp_[Creation_Time::USEC_FIELD] = 0;
32 Creation_Time::creation_time (const void *creation_time)
34 ACE_OS::memcpy (&this->time_stamp_,
36 Creation_Time::creation_time_length ());
39 ACE_INLINE const void *
40 Creation_Time::creation_time () const
42 return &this->time_stamp_;
46 Creation_Time::operator== (const Creation_Time &rhs) const
48 #if (POA_NO_TIMESTAMP == 1)
52 return ACE_OS::memcmp (&this->time_stamp_,
54 Creation_Time::creation_time_length ()) == 0;
55 #endif /* POA_NO_TIMESTAMP */
59 Creation_Time::operator!= (const Creation_Time &rhs) const
61 #if (POA_NO_TIMESTAMP == 1)
65 return ACE_OS::memcmp (&this->time_stamp_,
67 Creation_Time::creation_time_length ()) != 0;
68 #endif /* POA_NO_TIMESTAMP */
72 Temporary_Creation_Time::operator== (const Creation_Time &rhs) const
74 #if (POA_NO_TIMESTAMP == 1)
78 return ACE_OS::memcmp (this->time_stamp_,
80 Creation_Time::creation_time_length ()) == 0;
81 #endif /* POA_NO_TIMESTAMP */
85 Temporary_Creation_Time::operator!= (const Creation_Time &rhs) const
87 #if (POA_NO_TIMESTAMP == 1)
91 return ACE_OS::memcmp (this->time_stamp_,
93 Creation_Time::creation_time_length ()) != 0;
94 #endif /* POA_NO_TIMESTAMP */
98 Creation_Time::operator== (const Temporary_Creation_Time &rhs) const
104 Creation_Time::operator!= (const Temporary_Creation_Time &rhs) const
110 Temporary_Creation_Time::Temporary_Creation_Time ()
116 Temporary_Creation_Time::creation_time (const void *creation_time)
118 this->time_stamp_ = (void *) creation_time;
123 TAO_END_VERSIONED_NAMESPACE_DECL