#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 39 of file String_Manager_T.h. |
|
|||||
|
Definition at line 40 of file String_Manager_T.h. |
|
||||||||||
|
Default CTOR will initialize the underlying ptr_ to empty string.
Definition at line 43 of file String_Manager_T.h.
00043 : ptr_ (s_traits::default_initializer()) 00044 { 00045 } |
|
||||||||||
|
Copy constructor.
Definition at line 48 of file String_Manager_T.h.
00048 : 00049 ptr_ (s_traits::duplicate (rhs.ptr_)) 00050 { 00051 } |
|
||||||||||
|
Constructor from const char* makes a copy.
Definition at line 54 of file String_Manager_T.h.
00054 : 00055 ptr_ (s_traits::duplicate (s)) 00056 { 00057 } |
|
||||||||||
|
Destructor.
Definition at line 60 of file String_Manager_T.h.
00060 {
00061 s_traits::release (this->ptr_);
00062 }
|
|
||||||||||
|
For string of return type.
Definition at line 122 of file String_Manager_T.h.
00122 {
00123 character_type *temp = this->ptr_;
00124 this->ptr_ = 0;
00125 return temp;
00126 }
|
|
||||||||||
|
For in parameter.
Definition at line 105 of file String_Manager_T.h.
00105 {
00106 return this->ptr_;
00107 }
|
|
||||||||||
|
For inout parameter.
Definition at line 110 of file String_Manager_T.h.
00110 {
00111 return this->ptr_;
00112 }
|
|
|||||||||
|
Cast (read-only).
Definition at line 100 of file String_Manager_T.h.
00100 {
00101 return this->ptr_;
00102 }
|
|
||||||||||
|
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.
00093 {
00094 s_traits::release (this->ptr_);
00095 this->ptr_ = p;
00096 return *this;
00097 }
|
|
||||||||||
|
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 }
|
|
||||||||||
|
Assignment from var type will make a copy.
Definition at line 74 of file String_Manager_T.h. References TAO::String_Manager_T< charT >::ptr_.
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 }
|
|
||||||||||
|
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 }
|
|
||||||||||
|
for out parameter.
Definition at line 115 of file String_Manager_T.h.
|
|
|||||
|
The underlying string.
Definition at line 130 of file String_Manager_T.h. Referenced by TAO::String_Manager_T< charT >::operator=(). |
1.3.6