FooSeq Class Reference
[Sequence Support]

<<interface>> <<generic>> A type-safe, ordered collection of elements. The type of these elements is referred to in this documentation as Foo. More...

#include <managed_sequence.h>

Inheritance diagram for FooSeq:

DDS::LoanableSequence< E > DDS::Sequence< E >

List of all members.

Public Member Functions

 FooSeq ()
 Create a sequence with a maximum of 0.
 FooSeq (System::Int32 new_max)
 Create a sequence with the given maximum.
 FooSeq (FooSeq^ src)
 Create a sequence by copying from an existing sequence.


Detailed Description

<<interface>> <<generic>> A type-safe, ordered collection of elements. The type of these elements is referred to in this documentation as Foo.

For users who define data types in OMG IDL, this type corresponds to the IDL express sequence<Foo>.

For any user-data type Foo that an application defines for the purpose of data-distribution with RTI Data Distribution Service, a FooSeq is generated. We refer to an IDL sequence<Foo> as FooSeq.

The state of a sequence is described by the properties 'maximum', 'length' and 'owned'.

See also:
DDS::TypedDataWriter, DDS::TypedDataReader, FooTypeSupport, rtiddsgen

Constructor & Destructor Documentation

FooSeq::FooSeq (  ) 

Create a sequence with a maximum of 0.

This is a constructor for the sequence. The constructor will allocate no memory.

This constructor will be used when the application creates a sequence using one of the following:

In C#:

 FooSeq my_seq = new FooSeq();

In C++/CLI:

 FooSeq^ my_seq = gcnew FooSeq();

Postcondition:
maximum == 0

length == 0

owned == true,

FooSeq::FooSeq ( System::Int32  new_max  ) 

Create a sequence with the given maximum.

This is a constructor for the sequence. The constructor will automatically allocate memory to hold new_max elements of type Foo.

This constructor will be used when the application creates a sequence using one of the following:

In C#:

 FooSeq my_seq = new FooSeq(5);

In C++/CLI:

 FooSeq^ my_seq = gcnew FooSeq(5);

Postcondition:
maximum == new_max

length == 0

owned == true,

Parameters:
new_max Must be >= 0. Otherwise the sequence will be initialized to a new_max=0.

FooSeq::FooSeq ( FooSeq^   src  ) 

Create a sequence by copying from an existing sequence.

This is a constructor for the sequence. The constructor will automatically allocate memory to hold foo_seq::maximum() elements of type Foo and will copy the current contents of foo_seq into the new sequence.

This constructor will be used when the application creates a sequence using one of the following:

In C#:

 FooSeq my_seq = new FooSeq(foo_seq);

In C++/CLI:

 FooSeq^ my_seq = gcnew FooSeq(foo_seq);

Postcondition:
this::maximum == foo_seq::maximum

this::length == foo_seq::length

this[i] == foo_seq[i] for 0 <= i < foo_seq::length

this::owned == true

Note:
If the pre-conditions are not met, the constructor will initialize the new sequence to a maximum of zero.


RTI Data Distribution Service .Net APIs Version 4.5c Copyright © 9 Jun 2010 Real-Time Innovations, Inc