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

CORBA_String.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // $Id: CORBA_String.inl,v 1.1.1.2 2003/02/21 18:36:44 chad Exp $
00004 
00005 // ----------------------------------------------------------------------
00006 // String_var type
00007 // ----------------------------------------------------------------------
00008 
00009 ACE_INLINE
00010 CORBA_String_var::CORBA_String_var (void)
00011   : ptr_ (0)
00012 {
00013 }
00014 
00015 ACE_INLINE
00016 CORBA_String_var::CORBA_String_var (const char *p)
00017   : ptr_ (CORBA::string_dup (p))
00018 {
00019 }
00020 
00021 ACE_INLINE CORBA::Char &
00022 CORBA_String_var::operator[] (CORBA::ULong slot)
00023 {
00024   // We need to verify bounds else raise some exception.
00025   return this->ptr_[slot];
00026 }
00027 
00028 ACE_INLINE CORBA::Char
00029 CORBA_String_var::operator[] (CORBA::ULong slot) const
00030 {
00031   // We need to verify bounds else raise some exception.
00032   return this->ptr_[slot];
00033 }
00034 
00035 ACE_INLINE
00036 CORBA_String_var::operator char *&()
00037 {
00038   return this->ptr_;
00039 }
00040 
00041 ACE_INLINE
00042 CORBA_String_var::operator const char *() const
00043 {
00044   return this->ptr_;
00045 }
00046 
00047 ACE_INLINE const char *
00048 CORBA_String_var::in (void) const
00049 {
00050   return this->ptr_;
00051 }
00052 
00053 ACE_INLINE char *&
00054 CORBA_String_var::inout (void)
00055 {
00056   return this->ptr_;
00057 }
00058 
00059 ACE_INLINE char *&
00060 CORBA_String_var::out (void)
00061 {
00062   CORBA::string_free (this->ptr_);
00063   this->ptr_ = 0;
00064   return this->ptr_;
00065 }
00066 
00067 ACE_INLINE char *
00068 CORBA_String_var::_retn (void)
00069 {
00070   char *temp = this->ptr_;
00071   this->ptr_ = 0;
00072   return temp;
00073 }
00074 
00075 // ----------------------------------------------------
00076 //  String_out type
00077 // ----------------------------------------------------
00078 
00079 ACE_INLINE
00080 CORBA_String_out::CORBA_String_out (char *&s)
00081   : ptr_ (s)
00082 {
00083   this->ptr_ = 0;
00084 }
00085 
00086 ACE_INLINE
00087 CORBA_String_out::CORBA_String_out (CORBA_String_var &s)
00088   : ptr_ (s.out ())
00089 {
00090 }
00091 
00092 ACE_INLINE
00093 CORBA_String_out::CORBA_String_out (TAO_String_Manager &s)
00094   : ptr_ (s.out ())
00095 {
00096 }
00097 
00098 ACE_INLINE
00099 CORBA_String_out::CORBA_String_out (const CORBA_String_out &s)
00100   : ptr_ (s.ptr_)
00101 {
00102 }
00103 
00104 ACE_INLINE CORBA_String_out &
00105 CORBA_String_out::operator= (const CORBA_String_out &s)
00106 {
00107   this->ptr_ = s.ptr_;
00108   return *this;
00109 }
00110 
00111 ACE_INLINE CORBA_String_out &
00112 CORBA_String_out::operator= (char *s)
00113 {
00114   this->ptr_ = s;
00115   return *this;
00116 }
00117 
00118 ACE_INLINE CORBA_String_out &
00119 CORBA_String_out::operator= (const char *s)
00120 {
00121   this->ptr_ = CORBA::string_dup (s);
00122   return *this;
00123 }
00124 
00125 ACE_INLINE
00126 CORBA_String_out::operator char *&()
00127 {
00128   return this->ptr_;
00129 }
00130 
00131 ACE_INLINE char *&
00132 CORBA_String_out::ptr (void)
00133 {
00134   return this->ptr_;
00135 }
00136 
00137 // ****************************************************************
00138 
00139 // ----------------------------------------------------------------------
00140 // String_var type
00141 // ----------------------------------------------------------------------
00142 
00143 ACE_INLINE
00144 CORBA_WString_var::CORBA_WString_var (void)
00145   : ptr_ (0)
00146 {
00147 }
00148 
00149 ACE_INLINE
00150 CORBA_WString_var::CORBA_WString_var (const CORBA::WChar *p)
00151   : ptr_ (CORBA::wstring_dup (p))
00152 {
00153 }
00154 
00155 ACE_INLINE CORBA::WChar &
00156 CORBA_WString_var::operator[] (CORBA::ULong slot)
00157 {
00158   // @@ We need to verify bounds else raise some exception.
00159   return this->ptr_[slot];
00160 }
00161 
00162 ACE_INLINE CORBA::WChar
00163 CORBA_WString_var::operator[] (CORBA::ULong slot) const
00164 {
00165   // @@ We need to verify bounds else raise some exception.
00166   return this->ptr_[slot];
00167 }
00168 
00169 ACE_INLINE
00170 CORBA_WString_var::operator CORBA::WChar *()
00171 {
00172   return this->ptr_;
00173 }
00174 
00175 ACE_INLINE
00176 CORBA_WString_var::operator const CORBA::WChar *() const
00177 {
00178   return this->ptr_;
00179 }
00180 
00181 ACE_INLINE const CORBA::WChar *
00182 CORBA_WString_var::in (void) const
00183 {
00184   return this->ptr_;
00185 }
00186 
00187 ACE_INLINE CORBA::WChar *&
00188 CORBA_WString_var::inout (void)
00189 {
00190   return this->ptr_;
00191 }
00192 
00193 ACE_INLINE CORBA::WChar *&
00194 CORBA_WString_var::out (void)
00195 {
00196   CORBA::wstring_free (this->ptr_);
00197   this->ptr_ = 0;
00198   return this->ptr_;
00199 }
00200 
00201 ACE_INLINE CORBA::WChar *
00202 CORBA_WString_var::_retn (void)
00203 {
00204   CORBA::WChar *temp = this->ptr_;
00205   this->ptr_ = 0;
00206   return temp;
00207 }
00208 
00209 // ----------------------------------------------------
00210 //  String_out type
00211 // ----------------------------------------------------
00212 
00213 ACE_INLINE
00214 CORBA_WString_out::CORBA_WString_out (CORBA::WChar *&s)
00215   : ptr_ (s)
00216 {
00217   this->ptr_ = 0;
00218 }
00219 
00220 ACE_INLINE
00221 CORBA_WString_out::CORBA_WString_out (CORBA_WString_var &s)
00222   : ptr_ (s.out ())
00223 {
00224 }
00225 
00226 ACE_INLINE
00227 CORBA_WString_out::CORBA_WString_out (const CORBA_WString_out &s)
00228   : ptr_ (s.ptr_)
00229 {
00230 }
00231 
00232 ACE_INLINE CORBA_WString_out &
00233 CORBA_WString_out::operator= (const CORBA_WString_out &s)
00234 {
00235   this->ptr_ = s.ptr_;
00236   return *this;
00237 }
00238 
00239 ACE_INLINE CORBA_WString_out &
00240 CORBA_WString_out::operator= (CORBA::WChar *s)
00241 {
00242   this->ptr_ = s;
00243   return *this;
00244 }
00245 
00246 ACE_INLINE
00247 CORBA_WString_out::operator CORBA::WChar *&()
00248 {
00249   return this->ptr_;
00250 }
00251 
00252 ACE_INLINE CORBA::WChar *&
00253 CORBA_WString_out::ptr (void)
00254 {
00255   return this->ptr_;
00256 }

Generated on Mon Jun 16 13:48:10 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002