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

#include <Bounded_Basic_String_Sequence_T.h>

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 details::string_const_sequence_element<
element_traits > 
const_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 ()
 Default constructor.
 bounded_basic_string_sequence (CORBA::ULong length, value_type *data, CORBA::Boolean release)
 Default constructor.
CORBA::ULong maximum () const
 Return the maximum length of the sequence.
CORBA::Boolean release () const
 Returns the state of the sequence release flag.
CORBA::ULong length () const
 Returns the length of the sequence.
void length (CORBA::ULong length)
 Returns the length of the sequence.
const_element_type operator[] (CORBA::ULong i) const
 Get a const element from the sequence.
element_type operator[] (CORBA::ULong i)
 Get a const element from the sequence.
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_type * get_buffer (CORBA::Boolean orphan=false)
 Allows read-write access to the underlying buffer.

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_basic_string_sequence &rhs) throw ()

Static Public Member Functions

static value_type * allocbuf (CORBA::ULong maximum)
static value_type * allocbuf ()
static void freebuf (value_type *buffer)

Private Attributes

implementation_type impl_

template<typename charT, CORBA::ULong MAX>
class TAO::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::bounded_basic_string_sequence< charT, MAX >::allocation_traits

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

template<typename charT, CORBA::ULong MAX>
typedef details::string_const_sequence_element<element_traits> TAO::bounded_basic_string_sequence< charT, MAX >::const_element_type

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

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

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

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

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

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

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


Constructor & Destructor Documentation

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

Default constructor.

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

Default constructor.


Member Function Documentation

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

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

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

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

Allows read-write access to the underlying buffer.

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().

template<typename charT, CORBA::ULong MAX>
const_value_type const* TAO::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.

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

Returns the length of the sequence.

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

Returns the length of the sequence.

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

Return the maximum length of the sequence.

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

Get a const element from the sequence.

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

Get a const element from the sequence.

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

Returns the state of the sequence release flag.

template<typename charT, CORBA::ULong MAX>
void TAO::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.

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


Member Data Documentation

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


The documentation for this class was generated from the following file:
Generated on Thu Mar 22 07:26:06 2007 for TAO by  doxygen 1.4.7-1