Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_Unbounded_Sequence< CORBA::Octet > Class Reference

An unbounded sequence of Octets. More...

#include <Sequence.h>

Inheritance diagram for TAO_Unbounded_Sequence< CORBA::Octet >

Inheritance graph
[legend]
Collaboration diagram for TAO_Unbounded_Sequence< CORBA::Octet >:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_Unbounded_Sequence (void)
 see TAO_Unbounded_Sequence in "Sequence_T.h".

 TAO_Unbounded_Sequence (CORBA::ULong max)
 TAO_Unbounded_Sequence (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *data, CORBA::Boolean release = 0)
virtual ~TAO_Unbounded_Sequence (void)
 TAO_Unbounded_Sequence (const TAO_Unbounded_Sequence<CORBA::Octet> &)
TAO_Unbounded_Sequence<CORBA::Octet>& operator= (const TAO_Unbounded_Sequence<CORBA::Octet> &)
CORBA::Octet& operator[] (CORBA::ULong)
const CORBA::Octet& operator[] (CORBA::ULong) const
virtual void _allocate_buffer (CORBA::ULong length)
 Implement the methods for all the sequence, please seee TAO_Base_Sequence.

virtual void _deallocate_buffer (void)
 Must deallocate the buffer and then set it to zero.

CORBA::Octet* get_buffer (CORBA::Boolean orphan = 0)
const CORBA::Octet* get_buffer (void) const
void replace (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *data, CORBA::Boolean release = 0)
 See the general description of this methods in "Sequence_T.h".

ACE_Message_Blockmb (void) const
 Returns the underlying message block, the caller must *not* release the copy.

 TAO_Unbounded_Sequence (CORBA::ULong length, const ACE_Message_Block* mb)
 Create a sequence of octets from a single message block (i.e. it ignores any chaining in the meesage block).

void replace (CORBA::ULong length, const ACE_Message_Block* mb)
 Replaces the current buffer with <mb>, using only <length> bytes. It takes a duplicate of <mb> so the user still owns it.


Static Public Methods

void _tao_any_destructor (void*)
 Use in the implementation of insertion and extraction operators from CORBA::Any.

CORBA::Octet* allocbuf (CORBA::ULong)
 Allocate storage for the sequence, please note that the storage is always held in a ACE_Message_Block.

void freebuf (CORBA::Octet *)
 Free the storage.


Private Attributes

ACE_Message_Blockmb_

Friends

class  TAO_Marshal_Sequence

Detailed Description

An unbounded sequence of Octets.

Marshalling and demarshalling octet sequences can be highly optimize, for instance at demarshalling we don't require a copy from the CDR buffer to the octet sequence buffer, we can simply hold a duplicate of the underlying ACE_Message_Block. Specializing the TAO_Unbounded_Sequence<T> parametric class, is an excellent way to achieve this optimizations.


Constructor & Destructor Documentation

TAO_Unbounded_Sequence< CORBA::Octet >::~TAO_Unbounded_Sequence< CORBA::Octet > ( void ) [virtual]
 


Member Function Documentation

TAO_Unbounded_Sequence< CORBA::Octet >::TAO_Unbounded_Sequence< CORBA::Octet > ( CORBA::ULong length,
const ACE_Message_Block * mb )
 

Create a sequence of octets from a single message block (i.e. it ignores any chaining in the meesage block).

TAO_Unbounded_Sequence< CORBA::Octet >::TAO_Unbounded_Sequence< CORBA::Octet > ( const TAO_Unbounded_Sequence< CORBA::Octet >& rhs )
 

The copy constructor and assignment operators *do* copy the data, though we could simply duplicate the ref count in the ACE_Message_Block this will change the semantics for this operations.

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE TAO_Unbounded_Sequence< CORBA::Octet >::TAO_Unbounded_Sequence< CORBA::Octet > ( CORBA::ULong maximum,
CORBA::ULong length,
CORBA::Octet * data,
CORBA::Boolean release = 0 )
 

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE TAO_Unbounded_Sequence< CORBA::Octet >::TAO_Unbounded_Sequence< CORBA::Octet > ( CORBA::ULong maximum )
 

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE TAO_Unbounded_Sequence< CORBA::Octet >::TAO_Unbounded_Sequence< CORBA::Octet > ( void )
 

see TAO_Unbounded_Sequence in "Sequence_T.h".

void TAO_Unbounded_Sequence< CORBA::Octet >::_allocate_buffer ( CORBA::ULong length ) [virtual]
 

Implement the methods for all the sequence, please seee TAO_Base_Sequence.

Reimplemented from TAO_Base_Sequence.

void TAO_Unbounded_Sequence< CORBA::Octet >::_deallocate_buffer ( void ) [virtual]
 

Must deallocate the buffer and then set it to zero.

Reimplemented from TAO_Base_Sequence.

void TAO_Unbounded_Sequence< CORBA::Octet >::_tao_any_destructor ( void * x ) [static]
 

Use in the implementation of insertion and extraction operators from CORBA::Any.

Reimplemented in CORBA_OctetSeq.

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE CORBA::Octet * TAO_Unbounded_Sequence< CORBA::Octet >::allocbuf ( CORBA::ULong size ) [static]
 

Allocate storage for the sequence, please note that the storage is always held in a ACE_Message_Block.

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE void TAO_Unbounded_Sequence< CORBA::Octet >::freebuf ( CORBA::Octet * buffer ) [static]
 

Free the storage.

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE const CORBA::Octet * TAO_Unbounded_Sequence< CORBA::Octet >::get_buffer ( void ) const
 

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE CORBA::Octet * TAO_Unbounded_Sequence< CORBA::Octet >::get_buffer ( CORBA::Boolean orphan = 0 )
 

ACE_Message_Block * TAO_Unbounded_Sequence< CORBA::Octet >::mb ( void ) const
 

Returns the underlying message block, the caller must *not* release the copy.

TAO_Unbounded_Sequence< CORBA::Octet >& TAO_Unbounded_Sequence< CORBA::Octet >::operator= ( const TAO_Unbounded_Sequence< CORBA::Octet >& rhs )
 

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE const CORBA::Octet & TAO_Unbounded_Sequence< CORBA::Octet >::operator[] ( CORBA::ULong i ) const
 

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE CORBA::Octet & TAO_Unbounded_Sequence< CORBA::Octet >::operator[] ( CORBA::ULong i )
 

See the general description in "Sequence_T.h" NOTE: This last two methods can be rendered useless in certain cases, see below.

void TAO_Unbounded_Sequence< CORBA::Octet >::replace ( CORBA::ULong length,
const ACE_Message_Block * mb )
 

Replaces the current buffer with <mb>, using only <length> bytes. It takes a duplicate of <mb> so the user still owns it.

ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE void TAO_Unbounded_Sequence< CORBA::Octet >::replace ( CORBA::ULong max,
CORBA::ULong length,
CORBA::Octet * data,
CORBA::Boolean release = 0 )
 

See the general description of this methods in "Sequence_T.h".


Friends And Related Function Documentation

class TAO_Marshal_Sequence [friend]
 

For efficient marshalling and demarshalling.

Reimplemented from TAO_Base_Sequence.


Member Data Documentation

ACE_Message_Block * TAO_Unbounded_Sequence< CORBA::Octet >::mb_ [private]
 


The documentation for this class was generated from the following files:
Generated at Sat Dec 1 12:05:57 2001 for TAO by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000