TAO::String_var< charT > Class Template Reference

#include <CORBA_String.h>

List of all members.

Public Types

typedef charT character_type
typedef TAO::details::string_traits_base<
character_type
s_traits

Public Member Functions

 String_var (void)
 Default constructor.

 String_var (character_type *p)
 Constructor, owns p.

 String_var (const character_type *p)
 Constructor. Makes a copy of p.

 String_var (String_var< charT > const &s)
 Copy constructor.

 ~String_var (void)
 Destructor.

String_varoperator= (character_type *p)
 Assignment operator.

String_varoperator= (const character_type *p)
 Assignment to a const char*. Makes a copy.

String_varoperator= (String_var< character_type > const &s)
 Assignment operator.

 operator character_type *& ()
 Spec-defined read/write version.

 operator const character_type * () const
 Only read privileges.

character_typeoperator[] (CORBA::ULong slot)
 Allows access and modification using an slot.

character_type operator[] (CORBA::ULong slot) const
 Allows only accessing thru an slot.

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_
 Instance.


Detailed Description

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

Provides automatic deallocation of storage for the string once it goes out of scope.

Definition at line 50 of file CORBA_String.h.


Member Typedef Documentation

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

Definition at line 53 of file CORBA_String.h.

template<typename charT>
typedef TAO::details::string_traits_base<character_type> TAO::String_var< charT >::s_traits
 

Definition at line 54 of file CORBA_String.h.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 57 of file CORBA_String.h.

00057                              : ptr_ (0)
00058     {
00059     }

template<typename charT>
TAO::String_var< charT >::String_var character_type p  )  [inline]
 

Constructor, owns p.

Definition at line 62 of file CORBA_String.h.

00062                                           : ptr_ (p)
00063     {
00064     }

template<typename charT>
TAO::String_var< charT >::String_var const character_type p  )  [inline]
 

Constructor. Makes a copy of p.

Definition at line 67 of file CORBA_String.h.

00067                                                 : ptr_ (s_traits::duplicate (p))
00068     {
00069     }

template<typename charT>
TAO::String_var< charT >::String_var String_var< charT > const &  s  )  [inline]
 

Copy constructor.

Definition at line 72 of file CORBA_String.h.

00072                                                    : ptr_(s_traits::duplicate(s.ptr_))
00073     {
00074     }

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

Destructor.

Definition at line 77 of file CORBA_String.h.

00078     {
00079       s_traits::release (this->ptr_);
00080     }


Member Function Documentation

template<typename charT>
character_type* TAO::String_var< charT >::_retn void   )  [inline]
 

For string of return type.

Definition at line 153 of file CORBA_String.h.

Referenced by CORBA::ORB::object_to_string(), TAO_GIOP_Message_Lite::parse_request_header(), and TAO_IIOP_Profile::parse_string_i().

00154     {
00155       character_type *temp = this->ptr_;
00156       this->ptr_ = 0;
00157       return temp;
00158     }

template<typename charT>
const character_type* TAO::String_var< charT >::in void   )  const [inline]
 

For in parameter.

Definition at line 133 of file CORBA_String.h.

Referenced by CORBA::Object::_is_a(), CORBA::Exception::_name(), CORBA::Exception::_rep_id(), TAO_IIOP_Profile::decode_endpoints(), CORBA::Exception::Exception(), TAO_IIOP_Transport::get_listen_point(), TAO::Synch_Twoway_Invocation::handle_system_exception(), TAO::Synch_Twoway_Invocation::handle_user_exception(), TAO_IIOP_Endpoint::host(), TAO_Stub::marshal(), TAO_ORB_Parameters::mcast_discovery_endpoint(), TAO::String_Var_Equal_To::operator()(), operator<<(), operator>>(), TAO_IIOP_Profile::parse_string_i(), CORBA::ORB::resolve_initial_references(), TAO_ORB_Core::resolve_rir(), CORBA::ORB::resolve_service(), and TAO_IIOP_Profile::to_string().

00134     {
00135       return this->ptr_;
00136     }

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

For inout parameter.

Definition at line 139 of file CORBA_String.h.

Referenced by TAO::LocateRequest_Invocation::check_reply(), TAO::Synch_Twoway_Invocation::handle_system_exception(), TAO::Synch_Twoway_Invocation::handle_user_exception(), operator>>(), TAO_GIOP_Message_Lite::parse_request_header(), TAO_IIOP_Profile::parse_string_i(), CORBA::ORB::resolve_initial_references(), and TAO_IIOP_Profile::to_string().

00140     {
00141       return this->ptr_;
00142     }

template<typename charT>
TAO::String_var< charT >::operator character_type *&  )  [inline]
 

Spec-defined read/write version.

Definition at line 107 of file CORBA_String.h.

00108     {
00109       return this->ptr_;
00110     }

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

Only read privileges.

Definition at line 113 of file CORBA_String.h.

00114     {
00115       return this->ptr_;
00116     }

template<typename charT>
String_var& TAO::String_var< charT >::operator= String_var< character_type > const &  s  )  [inline]
 

Assignment operator.

Definition at line 99 of file CORBA_String.h.

00100     {
00101       String_var <charT> tmp (s);
00102       std::swap (this->ptr_, tmp.ptr_);
00103       return *this;
00104     }

template<typename charT>
String_var& TAO::String_var< charT >::operator= const character_type p  )  [inline]
 

Assignment to a const char*. Makes a copy.

Definition at line 91 of file CORBA_String.h.

00092     {
00093       String_var <charT> tmp (p);
00094       std::swap (this->ptr_, tmp.ptr_);
00095       return *this;
00096     }

template<typename charT>
String_var& TAO::String_var< charT >::operator= character_type p  )  [inline]
 

Assignment operator.

Definition at line 83 of file CORBA_String.h.

00084     {
00085       String_var <charT> tmp (p);
00086       std::swap (this->ptr_, tmp.ptr_);
00087       return *this;
00088     }

template<typename charT>
character_type TAO::String_var< charT >::operator[] CORBA::ULong  slot  )  const [inline]
 

Allows only accessing thru an slot.

Definition at line 126 of file CORBA_String.h.

00127     {
00128       // We need to verify bounds else raise some exception.
00129       return this->ptr_[slot];
00130     }

template<typename charT>
character_type& TAO::String_var< charT >::operator[] CORBA::ULong  slot  )  [inline]
 

Allows access and modification using an slot.

Definition at line 119 of file CORBA_String.h.

00120     {
00121       // We need to verify bounds else raise some exception.
00122       return this->ptr_[slot];
00123     }

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

For out parameter.

Definition at line 145 of file CORBA_String.h.

Referenced by TAO_IIOP_Profile::decode_endpoints(), TAO_IIOP_Transport::get_listen_point(), and TAO_IIOP_Acceptor::object_key().

00146     {
00147       s_traits::release (this->ptr_);
00148       this->ptr_ = 0;
00149       return this->ptr_;
00150     }


Member Data Documentation

template<typename charT>
character_type* TAO::String_var< charT >::ptr_ [private]
 

Instance.

Definition at line 162 of file CORBA_String.h.

Referenced by TAO::String_var< CORBA::Char >::operator=().


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