TAO::details::bounded_basic_string_sequence< charT, MAX > Class Template Reference

#include <Bounded_Basic_String_Sequence_T.h>

Inheritance diagram for TAO::details::bounded_basic_string_sequence< charT, MAX >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef charT character_type
typedef charT * value_type
typedef charT const * const_value_type
typedef details::string_traits<
charT, true > 
element_traits
typedef details::bounded_reference_allocation_traits<
value_type, element_traits,
MAX, true > 
allocation_traits
typedef details::string_sequence_element<
element_traits
element_type
typedef element_type subscript_type
typedef const_value_type const_subscript_type
typedef details::generic_sequence<
value_type, allocation_traits,
element_traits
implementation_type

Public Member Functions

 bounded_basic_string_sequence ()
 

 bounded_basic_string_sequence (CORBA::ULong length, value_type *data, CORBA::Boolean release)
 

CORBA::ULong maximum () const
 

CORBA::Boolean release () const
 

CORBA::ULong length () const
 

void length (CORBA::ULong length)
 

const_value_type operator[] (CORBA::ULong i) const
 []

element_type operator[] (CORBA::ULong i)
 []

const_value_type const * get_buffer () const
 This function allows read-only access to the sequence buffer. The sequence returns its buffer, allocating one of one has not yet been allocated. No direct modification of the returned buffer by the caller is permitted.

void replace (CORBA::ULong length, value_type *data, CORBA::Boolean release=false)
 Allows the buffer underlying a sequence to be replaced. The parameters to replace() are identical in type, order, and purpose to those for the <T *data> constructor for the sequence.

value_typeget_buffer (CORBA::Boolean orphan=false)
 If orphan is FALSE the sequence returns a pointer to its buffer, allocating one if it has not yet done so. The number of elements in the buffer can be determined from the sequence length() accessor.

If the orphan argument to get_buffer() is FALSE, the sequence maintains ownership of the underlying buffer. Elements in the returned buffer may be directly replaced by the caller. For sequences of strings, wide strings, and object references, the caller must use the sequence accessor to determine whether elements should be freed (using , , or <CORBA::release> for strings, wide strings, and object references, respective) before being directly assigned to.

If the orphan argument to get_buffer is TRUE, the sequence yields ownership of the buffer to the caller. If orphan is TRUE and the sequence does not own its buffer (i.e., its release_ flag is FALSE), the return value is a null pointer. If the buffer is taken from the sequence using this form of get_buffer(), the sequence reverts to the same state it would have if constructed using its default constructor. The caller becomes responsible for eventually freeing each element of the returned buffer (for strings, wide string, and object references), and then freeing the returned buffer itself using freebuf().

void swap (bounded_basic_string_sequence &rhs) throw ()

Static Public Member Functions

value_typeallocbuf (CORBA::ULong maximum)
value_typeallocbuf ()
void freebuf (value_type *buffer)

Private Attributes

implementation_type impl_

template<typename charT, CORBA::ULong MAX>
class TAO::details::bounded_basic_string_sequence< charT, MAX >


Member Typedef Documentation

template<typename charT, CORBA::ULong MAX>
typedef details::bounded_reference_allocation_traits<value_type,element_traits,MAX,true> TAO::details::bounded_basic_string_sequence< charT, MAX >::allocation_traits
 

Definition at line 33 of file Bounded_Basic_String_Sequence_T.h.

template<typename charT, CORBA::ULong MAX>
typedef charT TAO::details::bounded_basic_string_sequence< charT, MAX >::character_type
 

Definition at line 28 of file Bounded_Basic_String_Sequence_T.h.

template<typename charT, CORBA::ULong MAX>
typedef const_value_type TAO::details::bounded_basic_string_sequence< charT, MAX >::const_subscript_type
 

Definition at line 37 of file Bounded_Basic_String_Sequence_T.h.

template<typename charT, CORBA::ULong MAX>
typedef charT const* TAO::details::bounded_basic_string_sequence< charT, MAX >::const_value_type
 

Definition at line 30 of file Bounded_Basic_String_Sequence_T.h.

template<typename charT, CORBA::ULong MAX>
typedef details::string_traits<charT,true> TAO::details::bounded_basic_string_sequence< charT, MAX >::element_traits
 

Definition at line 32 of file Bounded_Basic_String_Sequence_T.h.

template<typename charT, CORBA::ULong MAX>
typedef details::string_sequence_element<element_traits> TAO::details::bounded_basic_string_sequence< charT, MAX >::element_type
 

Definition at line 35 of file Bounded_Basic_String_Sequence_T.h.

Referenced by TAO::details::bounded_basic_string_sequence< char, MAX >::operator[]().

template<typename charT, CORBA::ULong MAX>
typedef details::generic_sequence<value_type, allocation_traits, element_traits> TAO::details::bounded_basic_string_sequence< charT, MAX >::implementation_type
 

Definition at line 39 of file Bounded_Basic_String_Sequence_T.h.

template<typename charT, CORBA::ULong MAX>
typedef element_type TAO::details::bounded_basic_string_sequence< charT, MAX >::subscript_type
 

Definition at line 36 of file Bounded_Basic_String_Sequence_T.h.

template<typename charT, CORBA::ULong MAX>
typedef charT* TAO::details::bounded_basic_string_sequence< charT, MAX >::value_type
 

Definition at line 29 of file Bounded_Basic_String_Sequence_T.h.


Constructor & Destructor Documentation

template<typename charT, CORBA::ULong MAX>
TAO::details::bounded_basic_string_sequence< charT, MAX >::bounded_basic_string_sequence  )  [inline]
 

Definition at line 42 of file Bounded_Basic_String_Sequence_T.h.

00043     : impl_()
00044   {}

template<typename charT, CORBA::ULong MAX>
TAO::details::bounded_basic_string_sequence< charT, MAX >::bounded_basic_string_sequence CORBA::ULong  length,
value_type data,
CORBA::Boolean  release
[inline]
 

Definition at line 46 of file Bounded_Basic_String_Sequence_T.h.

00050     : impl_(MAX, length, data, release)
00051   {}


Member Function Documentation

template<typename charT, CORBA::ULong MAX>
value_type* TAO::details::bounded_basic_string_sequence< charT, MAX >::allocbuf  )  [inline, static]
 

Definition at line 101 of file Bounded_Basic_String_Sequence_T.h.

00101                                  {
00102     return implementation_type::allocbuf(MAX);
00103   }

template<typename charT, CORBA::ULong MAX>
value_type* TAO::details::bounded_basic_string_sequence< charT, MAX >::allocbuf CORBA::ULong  maximum  )  [inline, static]
 

Definition at line 97 of file Bounded_Basic_String_Sequence_T.h.

00098   {
00099     return implementation_type::allocbuf(maximum);
00100   }

template<typename charT, CORBA::ULong MAX>
void TAO::details::bounded_basic_string_sequence< charT, MAX >::freebuf value_type buffer  )  [inline, static]
 

Definition at line 104 of file Bounded_Basic_String_Sequence_T.h.

00105   {
00106     implementation_type::freebuf(buffer);
00107   }

template<typename charT, CORBA::ULong MAX>
value_type* TAO::details::bounded_basic_string_sequence< charT, MAX >::get_buffer CORBA::Boolean  orphan = false  )  [inline]
 

If orphan is FALSE the sequence returns a pointer to its buffer, allocating one if it has not yet done so. The number of elements in the buffer can be determined from the sequence length() accessor.

If the orphan argument to get_buffer() is FALSE, the sequence maintains ownership of the underlying buffer. Elements in the returned buffer may be directly replaced by the caller. For sequences of strings, wide strings, and object references, the caller must use the sequence accessor to determine whether elements should be freed (using , , or <CORBA::release> for strings, wide strings, and object references, respective) before being directly assigned to.

If the orphan argument to get_buffer is TRUE, the sequence yields ownership of the buffer to the caller. If orphan is TRUE and the sequence does not own its buffer (i.e., its release_ flag is FALSE), the return value is a null pointer. If the buffer is taken from the sequence using this form of get_buffer(), the sequence reverts to the same state it would have if constructed using its default constructor. The caller becomes responsible for eventually freeing each element of the returned buffer (for strings, wide string, and object references), and then freeing the returned buffer itself using freebuf().

Definition at line 90 of file Bounded_Basic_String_Sequence_T.h.

00090                                                               {
00091     return impl_.get_buffer(orphan);
00092   }

template<typename charT, CORBA::ULong MAX>
const_value_type const* TAO::details::bounded_basic_string_sequence< charT, MAX >::get_buffer  )  const [inline]
 

This function allows read-only access to the sequence buffer. The sequence returns its buffer, allocating one of one has not yet been allocated. No direct modification of the returned buffer by the caller is permitted.

Definition at line 79 of file Bounded_Basic_String_Sequence_T.h.

00079                                                      {
00080     return impl_.get_buffer();
00081   }

template<typename charT, CORBA::ULong MAX>
void TAO::details::bounded_basic_string_sequence< charT, MAX >::length CORBA::ULong  length  )  [inline]
 

Definition at line 66 of file Bounded_Basic_String_Sequence_T.h.

00066                                         {
00067     implementation_type::range::check_length(length, MAX);
00068     impl_.length(length);
00069   }

template<typename charT, CORBA::ULong MAX>
CORBA::ULong TAO::details::bounded_basic_string_sequence< charT, MAX >::length void   )  const [inline]
 

Definition at line 61 of file Bounded_Basic_String_Sequence_T.h.

Referenced by TAO::demarshal_sequence(), and TAO::marshal_sequence().

00061                                    {
00062     return impl_.length();
00063   }

template<typename charT, CORBA::ULong MAX>
CORBA::ULong TAO::details::bounded_basic_string_sequence< charT, MAX >::maximum  )  const [inline]
 

Definition at line 53 of file Bounded_Basic_String_Sequence_T.h.

Referenced by TAO::demarshal_sequence().

00053                                     {
00054     return impl_.maximum();
00055   }

template<typename charT, CORBA::ULong MAX>
element_type TAO::details::bounded_basic_string_sequence< charT, MAX >::operator[] CORBA::ULong  i  )  [inline]
 

[]

Definition at line 75 of file Bounded_Basic_String_Sequence_T.h.

00075                                                {
00076     return element_type(impl_[i], release());
00077   }

template<typename charT, CORBA::ULong MAX>
const_value_type TAO::details::bounded_basic_string_sequence< charT, MAX >::operator[] CORBA::ULong  i  )  const [inline]
 

[]

Definition at line 71 of file Bounded_Basic_String_Sequence_T.h.

00071                                                          {
00072     return impl_[i];
00073   }

template<typename charT, CORBA::ULong MAX>
CORBA::Boolean TAO::details::bounded_basic_string_sequence< charT, MAX >::release void   )  const [inline]
 

Definition at line 57 of file Bounded_Basic_String_Sequence_T.h.

Referenced by TAO::details::bounded_basic_string_sequence< char, MAX >::operator[]().

00057                                       {
00058     return impl_.release();
00059   }

template<typename charT, CORBA::ULong MAX>
void TAO::details::bounded_basic_string_sequence< charT, MAX >::replace CORBA::ULong  length,
value_type data,
CORBA::Boolean  release = false
[inline]
 

Allows the buffer underlying a sequence to be replaced. The parameters to replace() are identical in type, order, and purpose to those for the <T *data> constructor for the sequence.

Definition at line 83 of file Bounded_Basic_String_Sequence_T.h.

00086                                     {
00087     impl_.replace(MAX, length, data, release);
00088   }

template<typename charT, CORBA::ULong MAX>
void TAO::details::bounded_basic_string_sequence< charT, MAX >::swap bounded_basic_string_sequence< charT, MAX > &  rhs  )  throw () [inline]
 

Definition at line 93 of file Bounded_Basic_String_Sequence_T.h.

00093                                                                 {
00094     impl_.swap(rhs.impl_);
00095   }


Member Data Documentation

template<typename charT, CORBA::ULong MAX>
implementation_type TAO::details::bounded_basic_string_sequence< charT, MAX >::impl_ [private]
 

Definition at line 110 of file Bounded_Basic_String_Sequence_T.h.


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