#include <Unbounded_Basic_String_Sequence_T.h>
Public Types | |
typedef charT | character_type |
typedef character_type * | value_type |
typedef character_type const * | const_value_type |
typedef details::string_traits< character_type, true > | element_traits |
typedef details::unbounded_reference_allocation_traits< value_type, element_traits, true > | allocation_traits |
typedef details::string_sequence_element< element_traits > | element_type |
typedef details::string_const_sequence_element< element_traits > | const_element_type |
typedef details::generic_sequence< value_type, allocation_traits, element_traits > | implementation_type |
typedef element_type | subscript_type |
typedef const_value_type | const_subscript_type |
Public Member Functions | |
unbounded_basic_string_sequence () | |
Default constructor. | |
unbounded_basic_string_sequence (CORBA::ULong maximum) | |
unbounded_basic_string_sequence (CORBA::ULong maximum, CORBA::ULong length, value_type *data, CORBA::Boolean release) | |
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 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_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
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_basic_string_sequence &rhs) throw () |
| |
Static Public Member Functions | |
static value_type * | allocbuf (CORBA::ULong maximum) |
static void | freebuf (value_type *buffer) |
Private Attributes | |
implementation_type | impl_ |
Definition at line 23 of file Unbounded_Basic_String_Sequence_T.h.
typedef details::unbounded_reference_allocation_traits<value_type,element_traits,true> TAO::unbounded_basic_string_sequence< charT >::allocation_traits |
Definition at line 31 of file Unbounded_Basic_String_Sequence_T.h.
typedef charT TAO::unbounded_basic_string_sequence< charT >::character_type |
Definition at line 26 of file Unbounded_Basic_String_Sequence_T.h.
typedef details::string_const_sequence_element<element_traits> TAO::unbounded_basic_string_sequence< charT >::const_element_type |
Definition at line 34 of file Unbounded_Basic_String_Sequence_T.h.
typedef const_value_type TAO::unbounded_basic_string_sequence< charT >::const_subscript_type |
Definition at line 39 of file Unbounded_Basic_String_Sequence_T.h.
typedef character_type const* TAO::unbounded_basic_string_sequence< charT >::const_value_type |
Definition at line 28 of file Unbounded_Basic_String_Sequence_T.h.
typedef details::string_traits<character_type,true> TAO::unbounded_basic_string_sequence< charT >::element_traits |
Definition at line 30 of file Unbounded_Basic_String_Sequence_T.h.
typedef details::string_sequence_element<element_traits> TAO::unbounded_basic_string_sequence< charT >::element_type |
Definition at line 33 of file Unbounded_Basic_String_Sequence_T.h.
typedef details::generic_sequence<value_type, allocation_traits, element_traits> TAO::unbounded_basic_string_sequence< charT >::implementation_type |
Definition at line 36 of file Unbounded_Basic_String_Sequence_T.h.
typedef element_type TAO::unbounded_basic_string_sequence< charT >::subscript_type |
Definition at line 38 of file Unbounded_Basic_String_Sequence_T.h.
typedef character_type* TAO::unbounded_basic_string_sequence< charT >::value_type |
Definition at line 27 of file Unbounded_Basic_String_Sequence_T.h.
TAO::unbounded_basic_string_sequence< charT >::unbounded_basic_string_sequence | ( | ) | [inline] |
Default constructor.
Definition at line 43 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_.
00044 : impl_() 00045 {}
TAO::unbounded_basic_string_sequence< charT >::unbounded_basic_string_sequence | ( | CORBA::ULong | maximum | ) | [inline, explicit] |
Definition at line 48 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_.
00049 : impl_(maximum) 00050 {}
TAO::unbounded_basic_string_sequence< charT >::unbounded_basic_string_sequence | ( | CORBA::ULong | maximum, | |
CORBA::ULong | length, | |||
value_type * | data, | |||
CORBA::Boolean | release | |||
) | [inline] |
Definition at line 51 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_.
static value_type* TAO::unbounded_basic_string_sequence< charT >::allocbuf | ( | CORBA::ULong | maximum | ) | [inline, static] |
Definition at line 106 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::allocbuf().
Referenced by TAO::unbounded_basic_string_sequence< charT >::allocbuf().
static void TAO::unbounded_basic_string_sequence< charT >::freebuf | ( | value_type * | buffer | ) | [inline, static] |
Definition at line 110 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::freebuf().
Referenced by TAO::unbounded_basic_string_sequence< charT >::freebuf().
value_type* TAO::unbounded_basic_string_sequence< charT >::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().
Definition at line 98 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::get_buffer(), and TAO::unbounded_basic_string_sequence< charT >::impl_.
00098 { 00099 return impl_.get_buffer(orphan); 00100 }
const_value_type const* TAO::unbounded_basic_string_sequence< charT >::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 86 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::get_buffer(), and TAO::unbounded_basic_string_sequence< charT >::impl_.
Referenced by TAO::unbounded_basic_string_sequence< charT >::get_buffer().
00086 { 00087 return impl_.get_buffer(); 00088 }
void TAO::unbounded_basic_string_sequence< charT >::length | ( | CORBA::ULong | length | ) | [inline] |
Returns the length of the sequence.
Definition at line 74 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_, and TAO::unbounded_basic_string_sequence< charT >::length().
00074 { 00075 impl_.length(length); 00076 }
CORBA::ULong TAO::unbounded_basic_string_sequence< charT >::length | ( | void | ) | const [inline] |
Returns the length of the sequence.
Definition at line 70 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_, and TAO::unbounded_basic_string_sequence< charT >::length().
Referenced by TAO::unbounded_basic_string_sequence< charT >::length().
00070 { 00071 return impl_.length(); 00072 }
CORBA::ULong TAO::unbounded_basic_string_sequence< charT >::maximum | ( | ) | const [inline] |
Return the maximum length of the sequence.
Definition at line 62 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_, and TAO::unbounded_basic_string_sequence< charT >::maximum().
Referenced by TAO::unbounded_basic_string_sequence< charT >::maximum().
00062 { 00063 return impl_.maximum(); 00064 }
element_type TAO::unbounded_basic_string_sequence< charT >::operator[] | ( | CORBA::ULong | i | ) | [inline] |
Get a const element from the sequence.
Definition at line 82 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_, TAO::unbounded_basic_string_sequence< charT >::operator[](), and CORBA::release().
00082 { 00083 return element_type(impl_[i], release()); 00084 }
const_element_type TAO::unbounded_basic_string_sequence< charT >::operator[] | ( | CORBA::ULong | i | ) | const [inline] |
Get a const element from the sequence.
Definition at line 78 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_, TAO::unbounded_basic_string_sequence< charT >::operator[](), and CORBA::release().
Referenced by TAO::unbounded_basic_string_sequence< charT >::operator[]().
00078 { 00079 return const_element_type (impl_[i], release()); 00080 }
CORBA::Boolean TAO::unbounded_basic_string_sequence< charT >::release | ( | void | ) | const [inline] |
Returns the state of the sequence release flag.
Definition at line 66 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_.
00066 { 00067 return impl_.release(); 00068 }
void TAO::unbounded_basic_string_sequence< charT >::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 90 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_, CORBA::release(), and TAO::unbounded_basic_string_sequence< charT >::replace().
Referenced by TAO::unbounded_basic_string_sequence< charT >::replace().
void TAO::unbounded_basic_string_sequence< charT >::swap | ( | unbounded_basic_string_sequence< charT > & | rhs | ) | throw () [inline] |
Definition at line 102 of file Unbounded_Basic_String_Sequence_T.h.
References TAO::unbounded_basic_string_sequence< charT >::impl_, and TAO::unbounded_basic_string_sequence< charT >::swap().
Referenced by TAO::unbounded_basic_string_sequence< charT >::swap().
00102 { 00103 impl_.swap(rhs.impl_); 00104 }
implementation_type TAO::unbounded_basic_string_sequence< charT >::impl_ [private] |
Definition at line 117 of file Unbounded_Basic_String_Sequence_T.h.
Referenced by TAO::unbounded_basic_string_sequence< charT >::get_buffer(), TAO::unbounded_basic_string_sequence< charT >::length(), TAO::unbounded_basic_string_sequence< charT >::maximum(), TAO::unbounded_basic_string_sequence< charT >::operator[](), TAO::unbounded_basic_string_sequence< charT >::release(), TAO::unbounded_basic_string_sequence< charT >::replace(), TAO::unbounded_basic_string_sequence< charT >::swap(), and TAO::unbounded_basic_string_sequence< charT >::unbounded_basic_string_sequence().