#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 36 of file String_Manager_T.h.
typedef charT TAO::String_Manager_T< charT >::character_type |
Definition at line 39 of file String_Manager_T.h.
typedef TAO::details::string_traits_base<charT> TAO::String_Manager_T< charT >::s_traits |
Definition at line 40 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 43 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::ptr_.
00043 : ptr_ (s_traits::default_initializer()) 00044 { 00045 }
TAO::String_Manager_T< charT >::String_Manager_T | ( | const String_Manager_T< charT > & | rhs | ) | [inline] |
Copy constructor.
Definition at line 48 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::ptr_.
00048 : 00049 ptr_ (s_traits::duplicate (rhs.ptr_)) 00050 { 00051 }
TAO::String_Manager_T< charT >::String_Manager_T | ( | const character_type * | s | ) | [inline] |
Constructor from const char* makes a copy.
Definition at line 54 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::ptr_.
00054 : 00055 ptr_ (s_traits::duplicate (s)) 00056 { 00057 }
TAO::String_Manager_T< charT >::~String_Manager_T | ( | void | ) | [inline] |
Destructor.
Definition at line 60 of file String_Manager_T.h.
References CORBA::release().
00060 { 00061 s_traits::release (this->ptr_); 00062 }
character_type* TAO::String_Manager_T< charT >::_retn | ( | void | ) | [inline] |
For string of return type.
Definition at line 122 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::_retn(), and TAO::String_Manager_T< charT >::ptr_.
Referenced by TAO::String_Manager_T< charT >::_retn().
00122 { 00123 character_type *temp = this->ptr_; 00124 this->ptr_ = 0; 00125 return temp; 00126 }
const character_type* TAO::String_Manager_T< charT >::in | ( | void | ) | const [inline] |
For in parameter.
Definition at line 105 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::in(), and TAO::String_Manager_T< charT >::ptr_.
Referenced by TAO::String_Manager_T< charT >::in().
00105 { 00106 return this->ptr_; 00107 }
character_type*& TAO::String_Manager_T< charT >::inout | ( | void | ) | [inline] |
For inout parameter.
Definition at line 110 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::inout(), and TAO::String_Manager_T< charT >::ptr_.
Referenced by TAO::String_Manager_T< charT >::inout().
00110 { 00111 return this->ptr_; 00112 }
TAO::String_Manager_T< charT >::operator const character_type * | ( | ) | const [inline] |
Cast (read-only).
Definition at line 100 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::ptr_.
00100 { 00101 return this->ptr_; 00102 }
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 93 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::ptr_, and CORBA::release().
00093 { 00094 s_traits::release (this->ptr_); 00095 this->ptr_ = p; 00096 return *this; 00097 }
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 83 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::ptr_.
00083 { 00084 // Strongly exception safe by means of copy and non-throwing swap 00085 // technique. 00086 String_Manager_T <character_type> tmp (p); 00087 std::swap (this->ptr_, tmp.ptr_); 00088 return *this; 00089 }
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 74 of file String_Manager_T.h.
00074 { 00075 // Strongly exception safe by means of copy and non-throwing swap 00076 // technique. 00077 String_Manager_T <character_type> tmp (value.in ()); 00078 std::swap (this->ptr_, tmp.ptr_); 00079 return *this; 00080 }
String_Manager_T& TAO::String_Manager_T< charT >::operator= | ( | const String_Manager_T< charT > & | rhs | ) | [inline] |
Assignment from another managed type.
Definition at line 65 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::ptr_.
00065 { 00066 // Strongly exception safe by means of copy and non-throwing swap 00067 // technique. 00068 String_Manager_T <character_type> tmp (rhs); 00069 std::swap (this->ptr_, tmp.ptr_); 00070 return *this; 00071 }
character_type*& TAO::String_Manager_T< charT >::out | ( | void | ) | [inline] |
for out parameter.
Definition at line 115 of file String_Manager_T.h.
References TAO::String_Manager_T< charT >::out(), TAO::String_Manager_T< charT >::ptr_, and CORBA::release().
Referenced by TAO::String_Manager_T< charT >::out().
00115 { 00116 s_traits::release (this->ptr_); 00117 this->ptr_ = 0; 00118 return this->ptr_; 00119 }
character_type* TAO::String_Manager_T< charT >::ptr_ [private] |
The underlying string.
Definition at line 130 of file String_Manager_T.h.
Referenced by TAO::String_Manager_T< charT >::_retn(), TAO::String_Manager_T< charT >::in(), TAO::String_Manager_T< charT >::inout(), TAO::String_Manager_T< charT >::operator const character_type *(), TAO::String_Manager_T< charT >::operator=(), TAO::String_Manager_T< charT >::out(), and TAO::String_Manager_T< charT >::String_Manager_T().