#include <String_Manager_T.h>
Public Types | |
typedef charT | character_type |
typedef TAO::details::string_traits_base < charT > | s_traits |
Public Member Functions | |
String_Manager_T (void) | |
Default CTOR will initialize the underlying ptr_ to empty string. | |
String_Manager_T (const String_Manager_T< charT > &rhs) | |
Copy constructor. | |
String_Manager_T (const character_type *s) | |
Constructor from const char* makes a copy. | |
~String_Manager_T (void) | |
Destructor. | |
String_Manager_T & | operator= (const String_Manager_T< charT > &rhs) |
Assignment from another managed type. | |
String_Manager_T & | operator= (const typename s_traits::string_var &value) |
Assignment from var type will make a copy. | |
String_Manager_T & | operator= (const character_type *p) |
Assignment from a constant * will make a copy. | |
String_Manager_T & | operator= (character_type *p) |
operator const character_type * () const | |
Cast (read-only). | |
const character_type * | in (void) const |
For in parameter. | |
character_type *& | inout (void) |
For inout parameter. | |
character_type *& | out (void) |
for out parameter. | |
character_type * | _retn (void) |
For string of return type. | |
Private Attributes | |
character_type * | ptr_ |
The underlying string. |
Definition at line 37 of file String_Manager_T.h.
typedef charT TAO::String_Manager_T< charT >::character_type |
Definition at line 40 of file String_Manager_T.h.
typedef TAO::details::string_traits_base<charT> TAO::String_Manager_T< charT >::s_traits |
Definition at line 41 of file String_Manager_T.h.
TAO::String_Manager_T< charT >::String_Manager_T | ( | void | ) | [inline] |
Default CTOR will initialize the underlying ptr_ to empty string.
Definition at line 44 of file String_Manager_T.h.
: ptr_ (s_traits::default_initializer()) { }
TAO::String_Manager_T< charT >::String_Manager_T | ( | const String_Manager_T< charT > & | rhs | ) | [inline] |
Copy constructor.
Definition at line 49 of file String_Manager_T.h.
: ptr_ (s_traits::duplicate (rhs.ptr_)) { }
TAO::String_Manager_T< charT >::String_Manager_T | ( | const character_type * | s | ) | [inline] |
Constructor from const char* makes a copy.
Definition at line 55 of file String_Manager_T.h.
: ptr_ (s_traits::duplicate (s)) { }
TAO::String_Manager_T< charT >::~String_Manager_T | ( | void | ) | [inline] |
character_type* TAO::String_Manager_T< charT >::_retn | ( | void | ) | [inline] |
For string of return type.
Definition at line 123 of file String_Manager_T.h.
{ character_type *temp = this->ptr_; this->ptr_ = 0; return temp; }
const character_type* TAO::String_Manager_T< charT >::in | ( | void | ) | const [inline] |
character_type*& TAO::String_Manager_T< charT >::inout | ( | void | ) | [inline] |
TAO::String_Manager_T< charT >::operator const character_type * | ( | ) | const [inline] |
String_Manager_T& TAO::String_Manager_T< charT >::operator= | ( | character_type * | p | ) | [inline] |
Assignment from char* will not make a copy. The String_Manager_T will now own the string.
Definition at line 94 of file String_Manager_T.h.
{ s_traits::release (this->ptr_); this->ptr_ = p; return *this; }
String_Manager_T& TAO::String_Manager_T< charT >::operator= | ( | const typename s_traits::string_var & | value | ) | [inline] |
Assignment from var type will make a copy.
Definition at line 75 of file String_Manager_T.h.
{ // Strongly exception safe by means of copy and non-throwing swap // technique. String_Manager_T <character_type> tmp (value.in ()); std::swap (this->ptr_, tmp.ptr_); return *this; }
String_Manager_T& TAO::String_Manager_T< charT >::operator= | ( | const String_Manager_T< charT > & | rhs | ) | [inline] |
Assignment from another managed type.
Definition at line 66 of file String_Manager_T.h.
{ // Strongly exception safe by means of copy and non-throwing swap // technique. String_Manager_T <character_type> tmp (rhs); std::swap (this->ptr_, tmp.ptr_); return *this; }
String_Manager_T& TAO::String_Manager_T< charT >::operator= | ( | const character_type * | p | ) | [inline] |
Assignment from a constant * will make a copy.
Definition at line 84 of file String_Manager_T.h.
{ // Strongly exception safe by means of copy and non-throwing swap // technique. String_Manager_T <character_type> tmp (p); std::swap (this->ptr_, tmp.ptr_); return *this; }
character_type*& TAO::String_Manager_T< charT >::out | ( | void | ) | [inline] |
for out parameter.
Definition at line 116 of file String_Manager_T.h.
{ s_traits::release (this->ptr_); this->ptr_ = 0; return this->ptr_; }
character_type* TAO::String_Manager_T< charT >::ptr_ [private] |
The underlying string.
Definition at line 131 of file String_Manager_T.h.