diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2003-04-16 07:16:40 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2003-04-16 07:16:40 +0000 |
commit | 63602c137ac844339dcf34f258711de9930c4014 (patch) | |
tree | 4d88056968b93664a5e53a2342873c0d330fba5c /ace/String_Base.i | |
parent | d90f756b2f3f515fed3ec9990723cd10dbce8ece (diff) | |
download | ATCD-63602c137ac844339dcf34f258711de9930c4014.tar.gz |
ChangeLogTag:Wed Apr 16 00:10:37 2003 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'ace/String_Base.i')
-rw-r--r-- | ace/String_Base.i | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/ace/String_Base.i b/ace/String_Base.i index a78112d93b4..f4cb1a547da 100644 --- a/ace/String_Base.i +++ b/ace/String_Base.i @@ -1,6 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ + #include "ace/Malloc_Base.h" // Default constructor. @@ -32,10 +34,10 @@ ACE_String_Base<CHAR>::ACE_String_Base (const CHAR *s, size_t length; if (s != 0) - length = ACE_OS::strlen (s); + length = ACE_OS_String::strlen (s); else length = 0; - + this->set (s, length, release); } @@ -141,7 +143,7 @@ ACE_String_Base<CHAR>::set (const CHAR *s, int release) { size_t length; if (s != 0) - length = ACE_OS::strlen (s); + length = ACE_OS_String::strlen (s); else length = 0; @@ -195,7 +197,7 @@ ACE_String_Base<CHAR>::rep (void) const CHAR *new_string; ACE_NEW_RETURN (new_string, CHAR[this->len_ + 1], 0); - ACE_OS::strsncpy (new_string, this->rep_, this->len_+1); + ACE_OS_String::strsncpy (new_string, this->rep_, this->len_+1); return new_string; } @@ -220,7 +222,7 @@ ACE_String_Base<CHAR>::compare (const ACE_String_Base<CHAR> &s) const // Pick smaller of the two lengths and perform the comparison. size_t smaller_length = ace_min (this->len_, s.len_); - int result = ACE_OS::memcmp (this->rep_, + int result = ACE_OS_String::memcmp (this->rep_, s.rep_, smaller_length * sizeof (CHAR)); @@ -242,7 +244,7 @@ ACE_String_Base<CHAR>::operator== (const ACE_String_Base<CHAR> &s) const // Less than comparison operator. -template <class CHAR> ACE_INLINE int +template <class CHAR> ACE_INLINE int ACE_String_Base<CHAR>::operator < (const ACE_String_Base<CHAR> &s) const { ACE_TRACE ("ACE_String_Base<CHAR>::operator <"); @@ -272,8 +274,8 @@ template <class CHAR> ACE_INLINE ssize_t ACE_String_Base<CHAR>::find (const CHAR *s, size_t pos) const { CHAR *substr = this->rep_ + pos; - size_t len = ACE_OS::strlen (s); - CHAR *pointer = ACE_OS::strnstr (substr, s, len); + size_t len = ACE_OS_String::strlen (s); + CHAR *pointer = ACE_OS_String::strnstr (substr, s, len); if (pointer == 0) return ACE_String_Base<CHAR>::npos; else @@ -284,7 +286,7 @@ template <class CHAR> ACE_INLINE ssize_t ACE_String_Base<CHAR>::find (CHAR c, size_t pos) const { CHAR *substr = this->rep_ + pos; - CHAR *pointer = ACE_OS::strnchr (substr, c, this->len_ - pos); + CHAR *pointer = ACE_OS_String::strnchr (substr, c, this->len_ - pos); if (pointer == 0) return ACE_String_Base<CHAR>::npos; else @@ -318,15 +320,6 @@ ACE_String_Base<CHAR>::rfind (CHAR c, ssize_t pos) const return ACE_String_Base<CHAR>::npos; } -template <class CHAR> ACE_INLINE u_long -ACE_String_Base<CHAR>::hash (void) const -{ - return ACE::hash_pjw ((ACE_reinterpret_cast (char *, - ACE_const_cast (CHAR *, - this->rep_))), - this->len_ * sizeof (CHAR)); -} - template <class CHAR> ACE_INLINE ACE_String_Base<CHAR> operator+ (const ACE_String_Base<CHAR> &s, const ACE_String_Base<CHAR> &t) { |