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

CORBA_WString_var Class Reference

CORBA_WString var class. Provides automatic deallocation of storage for wide strings. More...

#include <CORBA_String.h>

List of all members.

Public Methods

 CORBA_WString_var (void)
 default constructor. More...

 CORBA_WString_var (CORBA::WChar *p)
 constructor, owns p. More...

 CORBA_WString_var (const CORBA::WChar *p)
 constructor. Makes a copy of p. More...

 CORBA_WString_var (const CORBA_WString_var &s)
 copy constructor. More...

 ~CORBA_WString_var (void)
 destructor. More...

CORBA_WString_var & operator= (CORBA::WChar *p)
 assignment operator. More...

CORBA_WString_var & operator= (const CORBA::WChar *p)
 assignment to a const char*. Makes a copy. More...

CORBA_WString_var & operator= (const CORBA_WString_var &s)
 assignment operator. More...

 operator CORBA::WChar * ()
 access and modify. More...

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

CORBA::WCharoperator[] (CORBA::ULong slot)
 allows access and modification using an slot. More...

CORBA::WChar operator[] (CORBA::ULong slot) const
 allows only accessing thru an slot. 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_
 instance. More...


Detailed Description

CORBA_WString var class. Provides automatic deallocation of storage for wide strings.

Definition at line 157 of file CORBA_String.h.


Constructor & Destructor Documentation

ACE_INLINE CORBA_WString_var::CORBA_WString_var void   
 

default constructor.

Definition at line 144 of file CORBA_String.inl.

00145   : ptr_ (0)
00146 {
00147 }

CORBA_WString_var::CORBA_WString_var CORBA::WChar   p
 

constructor, owns p.

Definition at line 69 of file CORBA_String.cpp.

00070   : ptr_ (p)
00071 {
00072   // NOTE: According to the CORBA spec this string must *not* be
00073   // copied, but it is non-compliant to use it/release it in the
00074   // calling code.  argument is consumed. p should never be NULL
00075 }

ACE_INLINE CORBA_WString_var::CORBA_WString_var const CORBA::WChar   p
 

constructor. Makes a copy of p.

Definition at line 150 of file CORBA_String.inl.

References CORBA::wstring_dup.

00151   : ptr_ (CORBA::wstring_dup (p))
00152 {
00153 }

CORBA_WString_var::CORBA_WString_var const CORBA_WString_var &    s
 

copy constructor.

Definition at line 77 of file CORBA_String.cpp.

References ptr_, and CORBA::wstring_dup.

00078 {
00079   this->ptr_ = CORBA::wstring_dup (r.ptr_);
00080 }

CORBA_WString_var::~CORBA_WString_var void   
 

destructor.

Definition at line 82 of file CORBA_String.cpp.

References ptr_, and CORBA::wstring_free.

00083 {
00084   CORBA::wstring_free (this->ptr_);
00085   this->ptr_ = 0;
00086 }


Member Function Documentation

ACE_INLINE CORBA::WChar * CORBA_WString_var::_retn void   
 

for string of return type.

Definition at line 202 of file CORBA_String.inl.

References ptr_.

00203 {
00204   CORBA::WChar *temp = this->ptr_;
00205   this->ptr_ = 0;
00206   return temp;
00207 }

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

for in parameter.

Definition at line 182 of file CORBA_String.inl.

References ptr_.

00183 {
00184   return this->ptr_;
00185 }

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

for inout parameter.

Definition at line 188 of file CORBA_String.inl.

References ptr_.

00189 {
00190   return this->ptr_;
00191 }

ACE_INLINE CORBA_WString_var::operator const CORBA::WChar *   const
 

only read privileges.

Definition at line 176 of file CORBA_String.inl.

References ptr_.

00177 {
00178   return this->ptr_;
00179 }

ACE_INLINE CORBA_WString_var::operator CORBA::WChar *  
 

access and modify.

Definition at line 170 of file CORBA_String.inl.

References ptr_.

00171 {
00172   return this->ptr_;
00173 }

CORBA_WString_var & CORBA_WString_var::operator= const CORBA_WString_var &    s
 

assignment operator.

Definition at line 109 of file CORBA_String.cpp.

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

00110 {
00111   if (this != &r)
00112     {
00113       CORBA::wstring_free (this->ptr_);
00114       this->ptr_ = CORBA::wstring_dup (r.ptr_);
00115     }
00116   return *this;
00117 }

CORBA_WString_var & CORBA_WString_var::operator= const CORBA::WChar   p
 

assignment to a const char*. Makes a copy.

Definition at line 100 of file CORBA_String.cpp.

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

00101 {
00102   CORBA::wstring_free (this->ptr_);
00103 
00104   this->ptr_ = CORBA::wstring_dup (p);
00105   return *this;
00106 }

CORBA_WString_var & CORBA_WString_var::operator= CORBA::WChar   p
 

assignment operator.

Definition at line 89 of file CORBA_String.cpp.

References ptr_, and CORBA::wstring_free.

00090 {
00091   if (this->ptr_ != p)
00092     {
00093       CORBA::wstring_free (this->ptr_);
00094       this->ptr_ = p;
00095     }
00096   return *this;
00097 }

ACE_INLINE CORBA::WChar CORBA_WString_var::operator[] CORBA::ULong    slot const
 

allows only accessing thru an slot.

Definition at line 163 of file CORBA_String.inl.

References ptr_.

00164 {
00165   // @@ We need to verify bounds else raise some exception.
00166   return this->ptr_[slot];
00167 }

ACE_INLINE CORBA::WChar & CORBA_WString_var::operator[] CORBA::ULong    slot
 

allows access and modification using an slot.

Definition at line 156 of file CORBA_String.inl.

References ptr_.

00157 {
00158   // @@ We need to verify bounds else raise some exception.
00159   return this->ptr_[slot];
00160 }

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

for out parameter.

Definition at line 194 of file CORBA_String.inl.

References ptr_, and CORBA::wstring_free.

00195 {
00196   CORBA::wstring_free (this->ptr_);
00197   this->ptr_ = 0;
00198   return this->ptr_;
00199 }


Member Data Documentation

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

instance.

Definition at line 213 of file CORBA_String.h.

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


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