00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Creation_Time.h 00006 * 00007 * $Id: Creation_Time.h 73138 2006-06-19 19:50:42Z jwillemsen $ 00008 * 00009 * Header file for Creation_Time and Temporary_Creation_Time 00010 * 00011 * @author Irfan Pyarali <irfan@cs.wustl.edu> 00012 */ 00013 //============================================================================= 00014 00015 #ifndef TAO_CREATION_TIME_H 00016 #define TAO_CREATION_TIME_H 00017 00018 #include /**/ "ace/pre.h" 00019 00020 #include "ace/Time_Value.h" 00021 #include "tao/Basic_Types.h" 00022 00023 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00024 # pragma once 00025 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00026 00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00028 00029 namespace TAO 00030 { 00031 namespace Portable_Server 00032 { 00033 class Temporary_Creation_Time; 00034 00035 class Creation_Time 00036 { 00037 public: 00038 explicit Creation_Time (const ACE_Time_Value &creation_time); 00039 00040 Creation_Time (void); 00041 00042 void creation_time (const void *creation_time); 00043 00044 const void *creation_time (void) const; 00045 00046 static CORBA::ULong creation_time_length (void); 00047 00048 bool operator== (const Creation_Time &rhs) const; 00049 00050 bool operator!= (const Creation_Time &rhs) const; 00051 00052 bool operator== (const Temporary_Creation_Time &rhs) const; 00053 00054 bool operator!= (const Temporary_Creation_Time &rhs) const; 00055 00056 protected: 00057 00058 enum 00059 { 00060 SEC_FIELD = 0, 00061 USEC_FIELD = 1 00062 }; 00063 00064 /// Timestamp 00065 CORBA::ULong time_stamp_[2]; 00066 00067 }; 00068 00069 /** 00070 * @class Temporary_Creation_Time 00071 * 00072 * @brief Special creation time only useful in the lifetime of the 00073 * upcall. 00074 * 00075 * Special creation time only useful in the lifetime of the upcall. 00076 */ 00077 class Temporary_Creation_Time 00078 { 00079 public: 00080 00081 Temporary_Creation_Time (void); 00082 00083 void creation_time (const void *creation_time); 00084 00085 bool operator== (const Creation_Time &rhs) const; 00086 00087 bool operator!= (const Creation_Time &rhs) const; 00088 00089 protected: 00090 00091 void *time_stamp_; 00092 }; 00093 } 00094 } 00095 00096 TAO_END_VERSIONED_NAMESPACE_DECL 00097 00098 #if defined (__ACE_INLINE__) 00099 # include "tao/PortableServer/Creation_Time.inl" 00100 #endif /* __ACE_INLINE__ */ 00101 00102 #include /**/ "ace/post.h" 00103 00104 #endif /* TAO_CREATION_TIME_H */