TAO::String_Manager_T< charT > Class Template Reference

#include <String_Manager_T.h>

List of all members.

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_Toperator= (const String_Manager_T< charT > &rhs)
 Assignment from another managed type.

String_Manager_Toperator= (const typename s_traits::string_var &value)
 Assignment from var type will make a copy.

String_Manager_Toperator= (const character_type *p)
 Assignment from a constant * will make a copy.

String_Manager_Toperator= (character_type *p)
 operator const character_type * () const
 Cast (read-only).

const character_typein (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_typeptr_
 The underlying string.

template<typename charT>
class TAO::String_Manager_T< charT >


Member Typedef Documentation

template<typename charT>
typedef charT TAO::String_Manager_T< charT >::character_type
 

Definition at line 39 of file String_Manager_T.h.

template<typename charT>
typedef TAO::details::string_traits_base<charT> TAO::String_Manager_T< charT >::s_traits
 

Definition at line 40 of file String_Manager_T.h.


Constructor & Destructor Documentation

template<typename charT>
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.

00043                                  : ptr_ (s_traits::default_initializer())
00044   {
00045   }

template<typename charT>
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.

00048                                                                :
00049     ptr_ (s_traits::duplicate (rhs.ptr_))
00050   {
00051   }

template<typename charT>
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.

00054                                                     :
00055     ptr_ (s_traits::duplicate (s))
00056   {
00057   }

template<typename charT>
TAO::String_Manager_T< charT >::~String_Manager_T void   )  [inline]
 

Destructor.

Definition at line 60 of file String_Manager_T.h.

00060                                   {
00061     s_traits::release (this->ptr_);
00062   }


Member Function Documentation

template<typename charT>
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.

00122                                       {
00123     character_type *temp = this->ptr_;
00124     this->ptr_ = 0;
00125     return temp;
00126   }

template<typename charT>
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.

00105                                                {
00106     return this->ptr_;
00107   }

template<typename charT>
character_type*& TAO::String_Manager_T< charT >::inout void   )  [inline]
 

For inout parameter.

Definition at line 110 of file String_Manager_T.h.

00110                                        {
00111     return this->ptr_;
00112   }

template<typename charT>
TAO::String_Manager_T< charT >::operator const character_type *  )  const [inline]
 

Cast (read-only).

Definition at line 100 of file String_Manager_T.h.

00100                                                 {
00101     return this->ptr_;
00102   }

template<typename charT>
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.

00093                                                          {
00094     s_traits::release (this->ptr_);
00095     this->ptr_ = p;
00096     return *this;
00097   }

template<typename charT>
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.

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   }

template<typename charT>
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   }

template<typename charT>
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.

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   }

template<typename charT>
character_type*& TAO::String_Manager_T< charT >::out void   )  [inline]
 

for out parameter.

Definition at line 115 of file String_Manager_T.h.

00115                                      {
00116     s_traits::release (this->ptr_);
00117     this->ptr_ = 0;
00118     return this->ptr_;
00119   }


Member Data Documentation

template<typename charT>
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< CORBA::Char >::operator=().


The documentation for this class was generated from the following file:
Generated on Thu Nov 9 12:26:58 2006 for TAO by doxygen 1.3.6