=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / tao / PortableServer / Creation_Time.inl
blob5a4785c550c273f7aee25716498494c6087a6bb1
1 // -*- C++ -*-
2 #include "tao/orbconf.h"        /* For POA_NO_TIMESTAMP definition. */
3 #include "ace/OS_NS_string.h"
5 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
7 namespace TAO
9   namespace Portable_Server
10   {
11     ACE_INLINE CORBA::ULong
12     Creation_Time::creation_time_length ()
13     {
14       return 2 * sizeof (CORBA::ULong);
15     }
17     ACE_INLINE
18     Creation_Time::Creation_Time (const ACE_Time_Value &creation_time)
19     {
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 ();
22     }
24     ACE_INLINE
25     Creation_Time::Creation_Time ()
26     {
27       this->time_stamp_[Creation_Time::SEC_FIELD]  = 0;
28       this->time_stamp_[Creation_Time::USEC_FIELD] = 0;
29     }
31     ACE_INLINE void
32     Creation_Time::creation_time (const void *creation_time)
33     {
34       ACE_OS::memcpy (&this->time_stamp_,
35                       creation_time,
36                       Creation_Time::creation_time_length ());
37     }
39     ACE_INLINE const void *
40     Creation_Time::creation_time () const
41     {
42       return &this->time_stamp_;
43     }
45     ACE_INLINE bool
46     Creation_Time::operator== (const Creation_Time &rhs) const
47     {
48     #if (POA_NO_TIMESTAMP == 1)
49       ACE_UNUSED_ARG (rhs);
50       return true;
51     #else
52       return ACE_OS::memcmp (&this->time_stamp_,
53                              &rhs.time_stamp_,
54                              Creation_Time::creation_time_length ()) == 0;
55     #endif /* POA_NO_TIMESTAMP */
56     }
58     ACE_INLINE bool
59     Creation_Time::operator!= (const Creation_Time &rhs) const
60     {
61     #if (POA_NO_TIMESTAMP == 1)
62       ACE_UNUSED_ARG (rhs);
63       return false;
64     #else
65       return ACE_OS::memcmp (&this->time_stamp_,
66                              &rhs.time_stamp_,
67                              Creation_Time::creation_time_length ()) != 0;
68     #endif /* POA_NO_TIMESTAMP */
69     }
71     ACE_INLINE bool
72     Temporary_Creation_Time::operator== (const Creation_Time &rhs) const
73     {
74     #if (POA_NO_TIMESTAMP == 1)
75       ACE_UNUSED_ARG (rhs);
76       return true;
77     #else
78       return ACE_OS::memcmp (this->time_stamp_,
79                              rhs.creation_time (),
80                              Creation_Time::creation_time_length ()) == 0;
81     #endif /* POA_NO_TIMESTAMP */
82     }
84     ACE_INLINE bool
85     Temporary_Creation_Time::operator!= (const Creation_Time &rhs) const
86     {
87     #if (POA_NO_TIMESTAMP == 1)
88       ACE_UNUSED_ARG (rhs);
89       return false;
90     #else
91       return ACE_OS::memcmp (this->time_stamp_,
92                              rhs.creation_time (),
93                              Creation_Time::creation_time_length ()) != 0;
94     #endif /* POA_NO_TIMESTAMP */
95     }
97     ACE_INLINE bool
98     Creation_Time::operator== (const Temporary_Creation_Time &rhs) const
99     {
100       return rhs == *this;
101     }
103     ACE_INLINE bool
104     Creation_Time::operator!= (const Temporary_Creation_Time &rhs) const
105     {
106       return rhs != *this;
107     }
109     ACE_INLINE
110     Temporary_Creation_Time::Temporary_Creation_Time ()
111       : time_stamp_ (0)
112     {
113     }
115     ACE_INLINE void
116     Temporary_Creation_Time::creation_time (const void *creation_time)
117     {
118       this->time_stamp_ = (void *) creation_time;
119     }
120   }
123 TAO_END_VERSIONED_NAMESPACE_DECL