message_queue_sequence Class Template Reference
[Collections Library]

#include <acestl/collections/message_queue_sequence.hpp>

Inheritance diagram for message_queue_sequence:

stl_collection_tag collection_tag

List of all members.


Detailed Description

template<ACE_SYNCH_DECL>
class acestl::message_queue_sequence< ACE_SYNCH_DECL >

An instance adaptor that adapts an instance of ACE_Message_Queue to provide an STL input-sequence interface.

It is used as follows:

using acestl::message_queue_sequence;
using stlsoft::auto_buffer;

ACE_Message_Queue<ACE_NULL_SYNCH>       &mq = . . .

// Adapt the message queue into the sequence
message_queue_sequence<ACE_NULL_SYNCH>  mqs(mq);

// Allocate a contiguous buffer, using stlsoft::auto_buffer
auto_buffer<char>                       buff(mqs.size());

// Block copy into the buffer
std::copy(&buff[0], &buff[0] + (buff.size()), mqs.begin());

Note:
Although this class provides Input Iterators, it uses customisations of std algorithms to effect very favourable performance, as described in chapter 31 of Extended STL, volume 1: Collections and Iterators.

Public Types

Types
typedef char value_type
 The value type.
typedef ACE_Message_Queue
< ACE_SYNCH_USE > 
sequence_type
 The sequence type.
typedef message_queue_sequence
< ACE_SYNCH_USE > 
class_type
 The current parameterisation of the type.
typedef size_t size_type
 The size type.

Public Member Functions

 message_queue_sequence (sequence_type &mq)
 Create an instance representing the given environment variable.
Iteration
iterator begin ()
 Begins the iteration.
iterator end ()
 Ends the iteration.
Attributes
size_type size () const
 Returns the number of bytes in the message queue.
bool empty () const
 Indicates whethere there are any bytes in the message queue.

Static Public Member Functions

Operations
static char * fast_copy (iterator f, iterator l, char *o)
static char * fast_copy (iterator f, size_type n, char *o)
static iterator fast_copy (char const *f, char const *l, iterator o)

Classes

class  iterator
 Iterator type for the message_queue_sequence class template. More...

Member Typedef Documentation

typedef char value_type

The value type.

typedef ACE_Message_Queue<ACE_SYNCH_USE> sequence_type

The sequence type.

typedef message_queue_sequence<ACE_SYNCH_USE> class_type

The current parameterisation of the type.

typedef size_t size_type

The size type.


Constructor & Destructor Documentation

message_queue_sequence ( sequence_type mq  )  [inline, explicit]

Create an instance representing the given environment variable.


Member Function Documentation

iterator begin (  )  [inline]

Begins the iteration.

Returns:
An iterator representing the start of the sequence

iterator end (  )  [inline]

Ends the iteration.

Returns:
An iterator representing the end of the sequence

size_type size (  )  const [inline]

Returns the number of bytes in the message queue.

bool empty (  )  const [inline]

Indicates whethere there are any bytes in the message queue.

References stlsoft::is_empty().


The documentation for this class was generated from the following file:

Generated on Thu Jun 10 08:58:23 2010 for STLSoft by  doxygen 1.5.6