TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX > Class Template Reference

#include <Bounded_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 object_t_var object_type_var
typedef details::object_reference_traits<
object_type, object_type_var,
true > 
element_traits
typedef details::bounded_reference_allocation_traits<
value_type, element_traits,
MAX, 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

 bounded_object_reference_sequence ()
 bounded_object_reference_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_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 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 (bounded_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, CORBA::ULong MAX>
class TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >


Member Typedef Documentation

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef details::bounded_reference_allocation_traits<value_type,element_traits,MAX,true> TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::allocation_traits
 

Definition at line 33 of file Bounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef details::object_reference_const_sequence_element<element_traits> TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::const_element_type
 

Definition at line 36 of file Bounded_Object_Reference_Sequence_T.h.

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

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef value_type const& TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::const_subscript_type
 

Definition at line 38 of file Bounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef value_type const TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::const_value_type
 

Definition at line 29 of file Bounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef details::object_reference_traits<object_type,object_type_var,true> TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::element_traits
 

Definition at line 32 of file Bounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef details::object_reference_sequence_element<element_traits> TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::element_type
 

Definition at line 35 of file Bounded_Object_Reference_Sequence_T.h.

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

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef details::generic_sequence<value_type, allocation_traits, element_traits> TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::implementation_type
 

Definition at line 40 of file Bounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef object_t TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::object_type
 

Definition at line 27 of file Bounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef object_t_var TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::object_type_var
 

Definition at line 30 of file Bounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef element_type TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::subscript_type
 

Definition at line 37 of file Bounded_Object_Reference_Sequence_T.h.

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
typedef object_type* TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::value_type
 

Definition at line 28 of file Bounded_Object_Reference_Sequence_T.h.


Constructor & Destructor Documentation

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::bounded_object_reference_sequence  )  [inline]
 

Definition at line 42 of file Bounded_Object_Reference_Sequence_T.h.

00043     : impl_()
00044   {}

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

Definition at line 45 of file Bounded_Object_Reference_Sequence_T.h.

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


Member Function Documentation

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

Definition at line 99 of file Bounded_Object_Reference_Sequence_T.h.

00100   {
00101     return implementation_type::allocbuf(maximum);
00102   }

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
void TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::freebuf value_type buffer  )  [inline, static]
 

Definition at line 103 of file Bounded_Object_Reference_Sequence_T.h.

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

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
value_type* TAO::bounded_object_reference_sequence< object_t, object_t_var, 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 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 91 of file Bounded_Object_Reference_Sequence_T.h.

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

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
value_type const* TAO::bounded_object_reference_sequence< object_t, object_t_var, 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 80 of file Bounded_Object_Reference_Sequence_T.h.

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

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

Definition at line 67 of file Bounded_Object_Reference_Sequence_T.h.

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

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

Definition at line 62 of file Bounded_Object_Reference_Sequence_T.h.

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

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

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

Definition at line 54 of file Bounded_Object_Reference_Sequence_T.h.

Referenced by TAO::demarshal_sequence().

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

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

[]

Definition at line 76 of file Bounded_Object_Reference_Sequence_T.h.

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

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

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

[]

Definition at line 72 of file Bounded_Object_Reference_Sequence_T.h.

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

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

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

Definition at line 58 of file Bounded_Object_Reference_Sequence_T.h.

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

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

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
void TAO::bounded_object_reference_sequence< object_t, object_t_var, 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 84 of file Bounded_Object_Reference_Sequence_T.h.

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

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
void TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::swap bounded_object_reference_sequence< object_t, object_t_var, MAX > &  rhs  )  throw () [inline]
 

Definition at line 95 of file Bounded_Object_Reference_Sequence_T.h.

00095                                                                     {
00096     impl_.swap(rhs.impl_);
00097   }


Member Data Documentation

template<typename object_t, typename object_t_var, CORBA::ULong MAX>
implementation_type TAO::bounded_object_reference_sequence< object_t, object_t_var, MAX >::impl_ [private]
 

Definition at line 110 of file Bounded_Object_Reference_Sequence_T.h.


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