// -*- C++ -*- // // $Id$ #include "ace/Malloc_Base.h" #include "ace/Min_Max.h" #include "ace/OS_NS_string.h" #include "ace/OS_Memory.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL template ACE_INLINE void ACE_String_Base::dump (void) const { #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_String_Base::dump"); #endif /* ACE_HAS_DUMP */ } // Assignment method (does not copy memory) template ACE_INLINE ACE_String_Base & ACE_String_Base::assign_nocopy (const ACE_String_Base &s) { ACE_TRACE ("ACE_String_Base::assign_nocopy"); this->set (s.rep_, s.len_, 0); return *this; } template ACE_INLINE typename ACE_String_Base::size_type ACE_String_Base::length (void) const { ACE_TRACE ("ACE_String_Base::length"); return this->len_; } template ACE_INLINE size_t ACE_String_Base::capacity (void) const { ACE_TRACE ("ACE_String_Base::capacity"); return this->buf_len_; } template ACE_INLINE bool ACE_String_Base::is_empty (void) const { return this->len_ == 0; } template ACE_INLINE bool ACE_String_Base::empty (void) const { return this->is_empty (); } template ACE_INLINE ACE_String_Base ACE_String_Base::substr ( typename ACE_String_Base::size_type offset, typename ACE_String_Base::size_type length) const { ACE_TRACE ("ACE_String_Base::substr"); return this->substring (offset, length); } // Return the character in the string. template ACE_INLINE const CHAR & ACE_String_Base::operator[] ( typename ACE_String_Base::size_type slot) const { ACE_TRACE ("ACE_String_Base::operator[]"); return this->rep_[slot]; } // Return the character in the string by reference. template ACE_INLINE CHAR & ACE_String_Base::operator[] ( typename ACE_String_Base::size_type slot) { ACE_TRACE ("ACE_String_Base::operator[]"); return this->rep_[slot]; } template ACE_INLINE const CHAR * ACE_String_Base::fast_rep (void) const { return this->rep_; } template ACE_INLINE const CHAR * ACE_String_Base::c_str (void) const { return this->rep_; } // Less than comparison operator. template ACE_INLINE bool ACE_String_Base::operator < (const ACE_String_Base &s) const { ACE_TRACE ("ACE_String_Base::operator <"); return compare (s) < 0; } // Greater than comparison operator. template ACE_INLINE bool ACE_String_Base::operator > (const ACE_String_Base &s) const { ACE_TRACE ("ACE_String_Base::operator >"); return compare (s) > 0; } // Comparison operator. template ACE_INLINE bool ACE_String_Base::operator!= (const ACE_String_Base &s) const { ACE_TRACE ("ACE_String_Base::operator!="); return !(*this == s); } template ACE_INLINE bool ACE_String_Base::operator!= (const CHAR *s) const { return !(*this == s); } template ACE_INLINE typename ACE_String_Base::size_type ACE_String_Base::find (const ACE_String_Base&str, typename ACE_String_Base::size_type pos) const { ACE_TRACE ("ACE_String_Base::find"); return this->find (str.rep_, pos); } template ACE_INLINE typename ACE_String_Base::size_type ACE_String_Base::strstr (const ACE_String_Base &s) const { ACE_TRACE ("ACE_String_Base::strstr"); return this->find (s.rep_); } template ACE_INLINE bool operator== (const CHAR *s, const ACE_String_Base &t) { return t == s; } template ACE_INLINE bool operator!= (const CHAR *s, const ACE_String_Base &t) { return !(t == s); } ACE_END_VERSIONED_NAMESPACE_DECL