00001 /* -*- C++ -*- */ 00002 // $Id: Log_Record.i,v 1.1.1.3 2001/12/04 14:33:02 chad Exp $ 00003 00004 // Log_Record.i 00005 00006 ASYS_INLINE 00007 ACE_Log_Record::~ACE_Log_Record (void) 00008 { 00009 } 00010 00011 ASYS_INLINE void 00012 ACE_Log_Record::encode (void) 00013 { 00014 ACE_TRACE ("ACE_Log_Record::encode"); 00015 this->length_ = htonl (this->length_); 00016 this->type_ = htonl (this->type_); 00017 // Make sure we don't enclose the sec() and usec() fields until 00018 // they've been normalized. 00019 this->secs_ = htonl (this->secs_); 00020 this->usecs_ = htonl (this->usecs_); 00021 this->pid_ = htonl (this->pid_); 00022 } 00023 00024 ASYS_INLINE void 00025 ACE_Log_Record::decode (void) 00026 { 00027 ACE_TRACE ("ACE_Log_Record::decode"); 00028 ACE_Time_Value tv (ntohl (this->secs_), 00029 ntohl (this->usecs_)); 00030 00031 this->secs_ = tv.sec (); 00032 this->usecs_ = tv.usec (); 00033 this->type_ = ntohl (this->type_); 00034 this->pid_ = ntohl (this->pid_); 00035 this->length_ = ntohl (this->length_); 00036 } 00037 00038 ASYS_INLINE long 00039 ACE_Log_Record::type (void) const 00040 { 00041 ACE_TRACE ("ACE_Log_Record::type"); 00042 return (long) this->type_; 00043 } 00044 00045 ASYS_INLINE void 00046 ACE_Log_Record::type (long t) 00047 { 00048 ACE_TRACE ("ACE_Log_Record::type"); 00049 this->type_ = (ACE_UINT32) t; 00050 } 00051 00052 ASYS_INLINE long 00053 ACE_Log_Record::length (void) const 00054 { 00055 ACE_TRACE ("ACE_Log_Record::length"); 00056 return (long) this->length_; 00057 } 00058 00059 ASYS_INLINE void 00060 ACE_Log_Record::length (long l) 00061 { 00062 ACE_TRACE ("ACE_Log_Record::length"); 00063 this->length_ = ACE_static_cast (ACE_UINT32, l); 00064 } 00065 00066 ASYS_INLINE ACE_Time_Value 00067 ACE_Log_Record::time_stamp (void) const 00068 { 00069 ACE_TRACE ("ACE_Log_Record::time_stamp"); 00070 return ACE_Time_Value ((long) this->secs_, (long) this->usecs_); 00071 } 00072 00073 ASYS_INLINE void 00074 ACE_Log_Record::time_stamp (const ACE_Time_Value &ts) 00075 { 00076 ACE_TRACE ("ACE_Log_Record::time_stamp"); 00077 this->secs_ = (ACE_UINT32) ts.sec (); 00078 this->usecs_ = (ACE_UINT32) ts.usec (); 00079 } 00080 00081 ASYS_INLINE long 00082 ACE_Log_Record::pid (void) const 00083 { 00084 ACE_TRACE ("ACE_Log_Record::pid"); 00085 return (long) this->pid_; 00086 } 00087 00088 ASYS_INLINE void 00089 ACE_Log_Record::pid (long p) 00090 { 00091 ACE_TRACE ("ACE_Log_Record::pid"); 00092 this->pid_ = (ACE_UINT32) p; 00093 } 00094 00095 ASYS_INLINE const ACE_TCHAR * 00096 ACE_Log_Record::msg_data (void) const 00097 { 00098 ACE_TRACE ("ACE_Log_Record::msg_data"); 00099 return this->msg_data_; 00100 } 00101 00102 ASYS_INLINE size_t 00103 ACE_Log_Record::msg_data_len (void) const 00104 { 00105 ACE_TRACE ("ACE_Log_Record::msg_data_len"); 00106 return ACE_OS::strlen (this->msg_data_) + 1; 00107 }
1.2.14 written by Dimitri van Heesch,
© 1997-2002