Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_WString_Manager Class Reference

Manager for wide strings. More...

#include <Managed_Types.h>

List of all members.

Public Methods

 TAO_WString_Manager (void)
 default CTOR will initialize the underlying ptr_ to empty string. More...

 TAO_WString_Manager (const TAO_WString_Manager &)
 copy constructor. More...

 ~TAO_WString_Manager (void)
 destructor. More...

TAO_WString_Manager & operator= (const TAO_WString_Manager &)
 assignment from another managed type. More...

TAO_WString_Manager & operator= (const CORBA::WString_var &)
 assignment from var type will make a copy. More...

TAO_WString_Manager & operator= (const CORBA::WChar *)
 assignment from a constant wchar* will make a copy. More...

TAO_WString_Manager & operator= (CORBA::WChar *)
 assignment from wchar* will not make a copy. The WString_Manager will now own the string. More...

 operator const CORBA::WChar * () const
 cast (read-only). More...

const CORBA::WCharin (void) const
 for in parameter. More...

CORBA::WChar *& inout (void)
 for inout parameter. More...

CORBA::WChar *& out (void)
 for out parameter. More...

CORBA::WChar_retn (void)
 for string of return type. More...


Private Attributes

CORBA::WCharptr_
 The underlying wide string. More...


Detailed Description

Manager for wide strings.

This class implements the generic wstring manager and is used in the C++ mapping of "struct" members that are of type "wstring". The difference between this class and the CORBA::WString_var class is that the default constructor initializes the underlying wstring to an empty string in this class whereas it is a NUL wstring for the _var class.

Definition at line 187 of file Managed_Types.h.


Constructor & Destructor Documentation

ACE_INLINE TAO_WString_Manager::TAO_WString_Manager void   
 

default CTOR will initialize the underlying ptr_ to empty string.

Definition at line 199 of file Managed_Types.i.

00200   :  ptr_ (0) // @@ CORBA::wstring_dup (""))
00201 {
00202 }

ACE_INLINE TAO_WString_Manager::TAO_WString_Manager const TAO_WString_Manager &   
 

copy constructor.

Definition at line 206 of file Managed_Types.i.

References CORBA::wstring_dup.

00207   :  ptr_ (CORBA::wstring_dup (rhs.ptr_))
00208 {
00209 }

ACE_INLINE TAO_WString_Manager::~TAO_WString_Manager void   
 

destructor.

Definition at line 213 of file Managed_Types.i.

References CORBA::wstring_free.

00214 {
00215   CORBA::wstring_free (this->ptr_);
00216 }


Member Function Documentation

ACE_INLINE CORBA::WChar * TAO_WString_Manager::_retn void   
 

for string of return type.

Definition at line 275 of file Managed_Types.i.

References ptr_.

00276 {
00277   CORBA::WChar *temp = this->ptr_;
00278   this->ptr_ = 0;
00279   return temp;
00280 }

ACE_INLINE const CORBA::WChar * TAO_WString_Manager::in void    const
 

for in parameter.

Definition at line 255 of file Managed_Types.i.

References ptr_.

00256 {
00257   return this->ptr_;
00258 }

ACE_INLINE CORBA::WChar *& TAO_WString_Manager::inout void   
 

for inout parameter.

Definition at line 261 of file Managed_Types.i.

References ptr_.

00262 {
00263   return this->ptr_;
00264 }

ACE_INLINE TAO_WString_Manager::operator const CORBA::WChar *   const
 

cast (read-only).

Definition at line 249 of file Managed_Types.i.

References ptr_.

00250 {
00251   return this->ptr_;
00252 }

ACE_INLINE TAO_WString_Manager & TAO_WString_Manager::operator= CORBA::WChar  
 

assignment from wchar* will not make a copy. The WString_Manager will now own the string.

Definition at line 241 of file Managed_Types.i.

References ptr_, and CORBA::wstring_free.

00242 {
00243   CORBA::wstring_free (this->ptr_);
00244   this->ptr_ = p;
00245   return *this;
00246 }

ACE_INLINE TAO_WString_Manager & TAO_WString_Manager::operator= const CORBA::WChar  
 

assignment from a constant wchar* will make a copy.

Definition at line 232 of file Managed_Types.i.

References ptr_, CORBA::wstring_dup, and CORBA::wstring_free.

00233 {
00234   CORBA::wstring_free (this->ptr_);
00235   this->ptr_ = CORBA::wstring_dup (p);
00236   return *this;
00237 }

TAO_WString_Manager & TAO_WString_Manager::operator= const CORBA::WString_var  
 

assignment from var type will make a copy.

Definition at line 36 of file Managed_Types.cpp.

References ptr_, CORBA::wstring_dup, and CORBA::wstring_free.

00037 {
00038   CORBA::wstring_free (this->ptr_);
00039   this->ptr_ = CORBA::wstring_dup (var.in ());
00040   return *this;
00041 }

ACE_INLINE TAO_WString_Manager & TAO_WString_Manager::operator= const TAO_WString_Manager &   
 

assignment from another managed type.

Definition at line 220 of file Managed_Types.i.

References ptr_, CORBA::wstring_dup, and CORBA::wstring_free.

00221 {
00222   if (this == &rhs)
00223     return *this;
00224 
00225   CORBA::wstring_free (this->ptr_);
00226   this->ptr_ = CORBA::wstring_dup (rhs.ptr_);
00227   return *this;
00228 }

ACE_INLINE CORBA::WChar *& TAO_WString_Manager::out void   
 

for out parameter.

Definition at line 267 of file Managed_Types.i.

References ptr_, and CORBA::wstring_free.

00268 {
00269   CORBA::wstring_free (this->ptr_);
00270   this->ptr_ = 0;
00271   return this->ptr_;
00272 }


Member Data Documentation

CORBA::WChar* TAO_WString_Manager::ptr_ [private]
 

The underlying wide string.

Definition at line 230 of file Managed_Types.h.

Referenced by _retn, in, inout, operator const CORBA::WChar *, operator=, and out.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:47:43 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002