#include <CORBA_SeqEx.h>
Public Member Functions | |
SequenceEx () | |
Default constructor. | |
SequenceEx (const CorbaSequence &_sq) | |
Copy constructor from CorbaSequence. | |
SequenceEx (const SequenceEx &_sq) | |
Copy constructor. | |
SequenceEx & | operator= (const SequenceEx &_sq) |
Assignment operator. | |
SequenceEx & | operator= (const CorbaSequence &_sq) |
Assignment operator from CorbaSequence. | |
virtual | ~SequenceEx () |
Destructor. | |
CORBA::ULong | size () |
Get size of this sequence. | |
CORBA::ULong | max_size () |
Get current maximum size of this sequence. | |
bool | empty () |
Test whether the sequence is empty. | |
void | resize (CORBA::ULong new_size, SequenceItem &item) |
Resize the length of the sequence. | |
void | insert (CORBA::ULong position, const SequenceItem &item) |
Insert a new item to the sequence. | |
SequenceItem | erase (CORBA::ULong position) |
Erase an item of the sequence. | |
template<class Predicate> | |
SequenceItem | erase_if (Predicate f) |
Erase an item according to the given predicate. | |
void | push_back (const SequenceItem &item) |
Append an item to the end of the sequence. | |
void | pop_back () |
Remove an item from the end of the sequence. | |
template<class F> | |
SequenceItem | find (F f) const |
Functor for sequence searches. | |
Public Attributes | |
Mutex | lock |
mutex for data locks |
This class extends CORBA sequence type, and provides std::vector like interfaces (like size(), max_size(), empty(), resize(), insert(), erase(), erase_if(), push_back(), pop_back(), find()). Since this class inherits CORBA sequence class, user can also use CORBA sequence interfaces (like operator=(), maximum(), length(), operator[]).
CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::SequenceEx | ( | ) | [inline] |
Default constructor.
Default constructor. This default constructor sets the sequence length of CorbaSequence base class.
CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::SequenceEx | ( | const CorbaSequence & | _sq | ) | [inline] |
Copy constructor from CorbaSequence.
This constructor copies sequence contents from given CorbaSequence to this object.
_sq | Copy source of CorbaSequence type |
CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::SequenceEx | ( | const SequenceEx< CorbaSequence, SequenceItem, Mutex > & | _sq | ) | [inline] |
Copy constructor.
_sq | Copy source. |
virtual CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::~SequenceEx | ( | ) | [inline, virtual] |
Destructor.
SequenceEx& CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::operator= | ( | const SequenceEx< CorbaSequence, SequenceItem, Mutex > & | _sq | ) | [inline] |
Assignment operator.
_sq | Copy source. |
SequenceEx& CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::operator= | ( | const CorbaSequence & | _sq | ) | [inline] |
Assignment operator from CorbaSequence.
_sq | Copy source. |
CORBA::ULong CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::size | ( | ) | [inline] |
Get size of this sequence.
This operation returns the size of the sequence. This is same as CorbaSequence::length().
CORBA::ULong CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::max_size | ( | ) | [inline] |
Get current maximum size of this sequence.
This operation returns the current maximum size of the sequence. This is same as CorbaSequence::maximum().
bool CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::empty | ( | ) | [inline] |
Test whether the sequence is empty.
This operation returns bool value whether the sequence is empty. If the size of the sequence is 0, this operation returns true, and in other case this operation returns false.
void CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::resize | ( | CORBA::ULong | new_size, | |
SequenceItem & | item | |||
) | [inline] |
Resize the length of the sequence.
This operation resizes the length of the sequence. If longer length than current sequence length is given, newly allocated rooms will be assigned by element given by the argument. If shorter length than current sequence length is given, the excessive element of a sequence is deleted like behavior of CorabSequence
new_size | The new size of the sequence | |
item | Sequence element to be assigned to new rooms. |
void CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::insert | ( | CORBA::ULong | position, | |
const SequenceItem & | item | |||
) | [inline] |
Insert a new item to the sequence.
This operation inserts a new item to the sequence. The length of the sequence will be expanded automatically.
position | The position of new inserted item. | |
item | Sequence element to be inserted. |
SequenceItem CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::erase | ( | CORBA::ULong | position | ) | [inline] |
Erase an item of the sequence.
This operation erases an item from the sequence.
position | The position of erased item. |
SequenceItem CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::erase_if | ( | Predicate | f | ) | [inline] |
Erase an item according to the given predicate.
This operation erases an item according to the given predicate.
f | The predicate functor to decide deletion. |
void CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::push_back | ( | const SequenceItem & | item | ) | [inline] |
Append an item to the end of the sequence.
This operation push back an item to the end of the sequence. The length of the sequence will be expanded automatically.
item | The object to be added to the end of the sequnce. |
void CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::pop_back | ( | ) | [inline] |
Remove an item from the end of the sequence.
This operation removes an item from the end of the sequence. The length of the sequence will be diminished automatically.
SequenceItem CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::find | ( | F | f | ) | const [inline] |
Functor for sequence searches.
Mutex CORBA_Sequence_Util::SequenceEx< CorbaSequence, SequenceItem, Mutex >::lock [mutable] |
mutex for data locks