TAO::unbounded_object_reference_sequence< object_t, object_t_var > Class Template Reference

#include <Unbounded_Object_Reference_Sequence_T.h>

List of all members.

Public Types

typedef object_t object_type
typedef object_typevalue_type
typedef value_type const  const_value_type
typedef details::object_reference_traits<
object_type, object_t_var,
true > 
element_traits
typedef details::unbounded_reference_allocation_traits<
value_type, element_traits,
true > 
allocation_traits
typedef details::object_reference_sequence_element<
element_traits
element_type
typedef details::object_reference_const_sequence_element<
element_traits
const_element_type
typedef element_type subscript_type
typedef value_type const & const_subscript_type
typedef details::generic_sequence<
value_type, allocation_traits,
element_traits
implementation_type

Public Member Functions

 unbounded_object_reference_sequence ()
 unbounded_object_reference_sequence (CORBA::ULong maximum)
 unbounded_object_reference_sequence (CORBA::ULong maximum, 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_element_type operator[] (CORBA::ULong i) const
 []

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

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 maximum, 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 release accessor to determine whether elements should be freed (using string_free, wstring_free, 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 (unbounded_object_reference_sequence &rhs) throw ()
 


Static Public Member Functions

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

Private Attributes

implementation_type impl_

template<typename object_t, typename object_t_var>
class TAO::unbounded_object_reference_sequence< object_t, object_t_var >


Member Typedef Documentation

template<typename object_t, typename object_t_var>
typedef details::unbounded_reference_allocation_traits<value_type,element_traits,true> TAO::unbounded_object_reference_sequence< object_t, object_t_var >::allocation_traits
 

Definition at line 32 of file Unbounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var>
typedef details::object_reference_const_sequence_element<element_traits> TAO::unbounded_object_reference_sequence< object_t, object_t_var >::const_element_type
 

Definition at line 35 of file Unbounded_Object_Reference_Sequence_T.h.

Referenced by TAO::unbounded_object_reference_sequence< object_t, object_t_var >::operator[]().

template<typename object_t, typename object_t_var>
typedef value_type const& TAO::unbounded_object_reference_sequence< object_t, object_t_var >::const_subscript_type
 

Definition at line 37 of file Unbounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var>
typedef value_type const TAO::unbounded_object_reference_sequence< object_t, object_t_var >::const_value_type
 

Definition at line 29 of file Unbounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var>
typedef details::object_reference_traits<object_type,object_t_var,true> TAO::unbounded_object_reference_sequence< object_t, object_t_var >::element_traits
 

Definition at line 31 of file Unbounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var>
typedef details::object_reference_sequence_element<element_traits> TAO::unbounded_object_reference_sequence< object_t, object_t_var >::element_type
 

Definition at line 34 of file Unbounded_Object_Reference_Sequence_T.h.

Referenced by TAO::unbounded_object_reference_sequence< object_t, object_t_var >::operator[]().

template<typename object_t, typename object_t_var>
typedef details::generic_sequence<value_type, allocation_traits, element_traits> TAO::unbounded_object_reference_sequence< object_t, object_t_var >::implementation_type
 

Definition at line 39 of file Unbounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var>
typedef object_t TAO::unbounded_object_reference_sequence< object_t, object_t_var >::object_type
 

Definition at line 27 of file Unbounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var>
typedef element_type TAO::unbounded_object_reference_sequence< object_t, object_t_var >::subscript_type
 

Definition at line 36 of file Unbounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var>
typedef object_type* TAO::unbounded_object_reference_sequence< object_t, object_t_var >::value_type
 

Definition at line 28 of file Unbounded_Object_Reference_Sequence_T.h.


Constructor & Destructor Documentation

template<typename object_t, typename object_t_var>
TAO::unbounded_object_reference_sequence< object_t, object_t_var >::unbounded_object_reference_sequence  )  [inline]
 

Definition at line 41 of file Unbounded_Object_Reference_Sequence_T.h.

00042     : impl_()
00043   {}

template<typename object_t, typename object_t_var>
TAO::unbounded_object_reference_sequence< object_t, object_t_var >::unbounded_object_reference_sequence CORBA::ULong  maximum  )  [inline, explicit]
 

Definition at line 44 of file Unbounded_Object_Reference_Sequence_T.h.

00045     : impl_(maximum)
00046   {}

template<typename object_t, typename object_t_var>
TAO::unbounded_object_reference_sequence< object_t, object_t_var >::unbounded_object_reference_sequence CORBA::ULong  maximum,
CORBA::ULong  length,
value_type data,
CORBA::Boolean  release
[inline]
 

Definition at line 47 of file Unbounded_Object_Reference_Sequence_T.h.

00052     : impl_(maximum, length, data, release)
00053   {}


Member Function Documentation

template<typename object_t, typename object_t_var>
value_type* TAO::unbounded_object_reference_sequence< object_t, object_t_var >::allocbuf CORBA::ULong  maximum  )  [inline, static]
 

Definition at line 101 of file Unbounded_Object_Reference_Sequence_T.h.

00102   {
00103     return implementation_type::allocbuf(maximum);
00104   }

template<typename object_t, typename object_t_var>
void TAO::unbounded_object_reference_sequence< object_t, object_t_var >::freebuf value_type buffer  )  [inline, static]
 

Definition at line 105 of file Unbounded_Object_Reference_Sequence_T.h.

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

template<typename object_t, typename object_t_var>
value_type* TAO::unbounded_object_reference_sequence< object_t, object_t_var >::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 release accessor to determine whether elements should be freed (using string_free, wstring_free, 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 93 of file Unbounded_Object_Reference_Sequence_T.h.

00093                                                               {
00094     return impl_.get_buffer(orphan);
00095   }

template<typename object_t, typename object_t_var>
value_type const* TAO::unbounded_object_reference_sequence< object_t, object_t_var >::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 81 of file Unbounded_Object_Reference_Sequence_T.h.

00081                                                {
00082     return impl_.get_buffer();
00083   }

template<typename object_t, typename object_t_var>
void TAO::unbounded_object_reference_sequence< object_t, object_t_var >::length CORBA::ULong  length  )  [inline]
 

Definition at line 69 of file Unbounded_Object_Reference_Sequence_T.h.

00069                                         {
00070     impl_.length(length);
00071   }

template<typename object_t, typename object_t_var>
CORBA::ULong TAO::unbounded_object_reference_sequence< object_t, object_t_var >::length void   )  const [inline]
 

Definition at line 64 of file Unbounded_Object_Reference_Sequence_T.h.

Referenced by TAO::marshal_sequence().

00064                                    {
00065     return impl_.length();
00066   }

template<typename object_t, typename object_t_var>
CORBA::ULong TAO::unbounded_object_reference_sequence< object_t, object_t_var >::maximum  )  const [inline]
 

Definition at line 56 of file Unbounded_Object_Reference_Sequence_T.h.

00056                                     {
00057     return impl_.maximum();
00058   }

template<typename object_t, typename object_t_var>
element_type TAO::unbounded_object_reference_sequence< object_t, object_t_var >::operator[] CORBA::ULong  i  )  [inline]
 

[]

Definition at line 77 of file Unbounded_Object_Reference_Sequence_T.h.

References TAO::unbounded_object_reference_sequence< object_t, object_t_var >::element_type, and TAO::unbounded_object_reference_sequence< object_t, object_t_var >::release().

00077                                                {
00078     return element_type(impl_[i], release());
00079   }

template<typename object_t, typename object_t_var>
const_element_type TAO::unbounded_object_reference_sequence< object_t, object_t_var >::operator[] CORBA::ULong  i  )  const [inline]
 

[]

Definition at line 73 of file Unbounded_Object_Reference_Sequence_T.h.

References TAO::unbounded_object_reference_sequence< object_t, object_t_var >::const_element_type, and TAO::unbounded_object_reference_sequence< object_t, object_t_var >::release().

00073                                                            {
00074     return const_element_type (impl_[i], release());
00075   }

template<typename object_t, typename object_t_var>
CORBA::Boolean TAO::unbounded_object_reference_sequence< object_t, object_t_var >::release void   )  const [inline]
 

Definition at line 60 of file Unbounded_Object_Reference_Sequence_T.h.

Referenced by TAO::unbounded_object_reference_sequence< object_t, object_t_var >::operator[]().

00060                                       {
00061     return impl_.release();
00062   }

template<typename object_t, typename object_t_var>
void TAO::unbounded_object_reference_sequence< object_t, object_t_var >::replace CORBA::ULong  maximum,
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 85 of file Unbounded_Object_Reference_Sequence_T.h.

00089                                     {
00090     impl_.replace(maximum, length, data, release);
00091   }

template<typename object_t, typename object_t_var>
void TAO::unbounded_object_reference_sequence< object_t, object_t_var >::swap unbounded_object_reference_sequence< object_t, object_t_var > &  rhs  )  throw () [inline]
 

Definition at line 97 of file Unbounded_Object_Reference_Sequence_T.h.

00097                                                                       {
00098     impl_.swap(rhs.impl_);
00099   }


Member Data Documentation

template<typename object_t, typename object_t_var>
implementation_type TAO::unbounded_object_reference_sequence< object_t, object_t_var >::impl_ [private]
 

Definition at line 112 of file Unbounded_Object_Reference_Sequence_T.h.


The documentation for this class was generated from the following file:
Generated on Sun Jan 27 13:18:56 2008 for TAO by doxygen 1.3.6