Classes | Functions
CORBA_SeqUtil Namespace Reference

CORBA IOR helper functions. More...

Classes

class  CORBA_SeqUtilTests
 
class  Logger
 
class  PortMock
 

Functions

template<class CorbaSequence , class SequenceElement >
SequenceElement & back (CorbaSequence &seq)
 Get the last element of the CORBA sequence. More...
 
template<class CorbaSequence >
void clear (CorbaSequence &seq)
 Erase all the elements of the CORBA sequence. More...
 
template<class CorbaSequence >
void erase (CorbaSequence &seq, CORBA::ULong index)
 Erase the element of the specified index. More...
 
template<class CorbaSequence , class Functor >
void erase_if (CorbaSequence &seq, Functor f)
 Remove an element of a sequence according to a predicate. More...
 
template<class CorbaSequence , class Functor >
CORBA::Long find (const CorbaSequence &seq, Functor f)
 Return the index of CORBA sequence element that functor matches. More...
 
template<class CorbaSequence , class Functor >
Functor for_each (CorbaSequence &seq, Functor f)
 Apply the functor to all CORBA sequence elements. More...
 
template<class CorbaSequence , class SequenceElement >
SequenceElement & front (CorbaSequence &seq)
 Get the front element of the CORBA sequence. More...
 
template<class CorbaSequence , class SequenceElement >
void insert (CorbaSequence &seq, SequenceElement &elem, CORBA::ULong index)
 Insert the element to the CORBA sequence. More...
 
template<class CorbaSequence , class SequenceElement >
void push_back (CorbaSequence &seq, SequenceElement elem)
 Push the new element back to the CORBA sequence. More...
 
template<class CorbaSequence >
void push_back_list (CorbaSequence &seq1, const CorbaSequence &seq2)
 Merge the elements of the CORBA sequence. More...
 
template<class CorbaRefSequence >
coil::vstring refToVstring (const CorbaRefSequence &objlist)
 

Detailed Description

CORBA IOR helper functions.

CORBA sequence helper template functions.

This group provides the following utility function to CORBA sequence. Since these functions are not thread-safe operations, if the sequence would be operated in thread-safe, the value should be protected by mutex properly.

Function Documentation

template<class CorbaSequence , class SequenceElement >
SequenceElement& CORBA_SeqUtil::back ( CorbaSequence &  seq)

Get the last element of the CORBA sequence.

This operation returns seq[seq.length() - 1].

Parameters
seqThe CORBA sequence to be get the element
Returns
An acquisition element

Definition at line 317 of file CORBA_SeqUtil.h.

template<class CorbaSequence >
void CORBA_SeqUtil::clear ( CorbaSequence &  seq)

Erase all the elements of the CORBA sequence.

same as seq.length(0).

Definition at line 405 of file CORBA_SeqUtil.h.

template<class CorbaSequence >
void CORBA_SeqUtil::erase ( CorbaSequence &  seq,
CORBA::ULong  index 
)

Erase the element of the specified index.

This operation removes the element of the given index. The other elements are closed up around the hole.

Parameters
seqThe CORBA sequence to be get the element
indexThe index of the element to be removed

Definition at line 345 of file CORBA_SeqUtil.h.

template<class CorbaSequence , class Functor >
void CORBA_SeqUtil::erase_if ( CorbaSequence &  seq,
Functor  f 
)

Remove an element of a sequence according to a predicate.

This operation removes the element from sequence when a condition of a function object given as a predicate is True.

Parameters
seqtarget CORBA sequence
fpredicate which decides a sequence to remove

Definition at line 381 of file CORBA_SeqUtil.h.

template<class CorbaSequence , class Functor >
CORBA::Long CORBA_SeqUtil::find ( const CorbaSequence &  seq,
Functor  f 
)

Return the index of CORBA sequence element that functor matches.

This operation applies the given functor to the given CORBA sequence, and returns the index of the sequence element that the functor matches. The functor should be bool functor(const CORBA sequence element) type, and it would return true, if the element matched the functor.

Parameters
seqCORBA sequence to be applied the functor
fA functor to process CORBA sequence elements
Returns
The index of the element that functor matches. If no element found, it would return -1.

Definition at line 142 of file CORBA_SeqUtil.h.

template<class CorbaSequence , class Functor >
Functor CORBA_SeqUtil::for_each ( CorbaSequence &  seq,
Functor  f 
)

Apply the functor to all CORBA sequence elements.

Apply the given functor to the given CORBA sequence. functor should be void functor(CORBA sequence element).

Parameters
seqCORBA sequence to be applied the functor
fA functor to process CORBA sequence elements
Returns
Functor that processed all CORBA sequence elements

Definition at line 98 of file CORBA_SeqUtil.h.

template<class CorbaSequence , class SequenceElement >
SequenceElement& CORBA_SeqUtil::front ( CorbaSequence &  seq)

Get the front element of the CORBA sequence.

This operation returns seq[0].

Parameters
seqCORBA sequence which acquires an element
Returns
An acquisition element
Parameters
seqThe CORBA sequence to be get the element

Definition at line 288 of file CORBA_SeqUtil.h.

template<class CorbaSequence , class SequenceElement >
void CORBA_SeqUtil::insert ( CorbaSequence &  seq,
SequenceElement &  elem,
CORBA::ULong  index 
)

Insert the element to the CORBA sequence.

Insert a new element in the given position to the CORBA sequence. If the given index is greater than the length of the sequence, the given element is pushed back to the last of the sequence. The length of the CORBA sequence will be expanded automatically.

Parameters
seqThe CORBA sequence to be inserted a new element
elemThe new element to be inserted the sequence
indexThe inserting position

Definition at line 245 of file CORBA_SeqUtil.h.

template<class CorbaSequence , class SequenceElement >
void CORBA_SeqUtil::push_back ( CorbaSequence &  seq,
SequenceElement  elem 
)

Push the new element back to the CORBA sequence.

Add the given element to the last of CORBA sequence. The length of the CORBA sequence will be expanded automatically.

Parameters
seqCORBA sequence to be added a new element
elemThe new element to be added to the CORBA sequence

Definition at line 175 of file CORBA_SeqUtil.h.

template<class CorbaSequence >
void CORBA_SeqUtil::push_back_list ( CorbaSequence &  seq1,
const CorbaSequence &  seq2 
)

Merge the elements of the CORBA sequence.

Merge given CORBA sequences.

Parameters
seq1merge target CORBA sequence
seq2merge target CORBA sequence

Definition at line 203 of file CORBA_SeqUtil.h.

template<class CorbaRefSequence >
coil::vstring CORBA_SeqUtil::refToVstring ( const CorbaRefSequence &  objlist)

Definition at line 413 of file CORBA_SeqUtil.h.



openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:26:02