OpenRTM-aist-Python 1.1.2
Functions
/tmp/workspace/03_openrtm-python-build-tags/OpenRTM_aist/CORBA_SeqUtil.py File Reference

CORBA sequence utility template functions. More...

Functions

def OpenRTM_aist.CORBA_SeqUtil.for_each (seq, f)
 Apply the functor to all CORBA sequence elements. More...
 
def OpenRTM_aist.CORBA_SeqUtil.find (seq, f)
 Return the index of CORBA sequence element that functor matches. More...
 
def OpenRTM_aist.CORBA_SeqUtil.push_back (seq, elem)
 Push the new element back to the CORBA sequence. More...
 
def OpenRTM_aist.CORBA_SeqUtil.insert (seq, elem, index)
 Insert the element to the CORBA sequence. More...
 
def OpenRTM_aist.CORBA_SeqUtil.front (seq)
 Get the front element of the CORBA sequence. More...
 
def OpenRTM_aist.CORBA_SeqUtil.back (seq)
 Get the last element of the CORBA sequence. More...
 
def OpenRTM_aist.CORBA_SeqUtil.erase (seq, index)
 Erase the element of the specified index. More...
 
def OpenRTM_aist.CORBA_SeqUtil.clear (seq)
 Erase all the elements of the CORBA sequence. More...
 
def OpenRTM_aist.CORBA_SeqUtil.refToVstring (objlist)
 coil::vstring refToVstring(const CorbaRefSequence& objlist)
 

Detailed Description

CORBA sequence utility template functions.

Date
Date
2007/09/03
Author
Noriaki Ando n-and.nosp@m.o@ai.nosp@m.st.go.nosp@m..jp and Shinji Kurihara

Copyright (C) 2006-2008 Task-intelligence Research Group, Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved.

Function Documentation

def OpenRTM_aist.CORBA_SeqUtil.back (   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
def OpenRTM_aist.CORBA_SeqUtil.clear (   seq)

Erase all the elements of the CORBA sequence.

same as seq.length(0).

def OpenRTM_aist.CORBA_SeqUtil.erase (   seq,
  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
def OpenRTM_aist.CORBA_SeqUtil.find (   seq,
  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
functorA functor to process CORBA sequence elements
Returns
The index of the element that functor matches. If no element found, it would return -1.
def OpenRTM_aist.CORBA_SeqUtil.for_each (   seq,
  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
functorA functor to process CORBA sequence elements
Returns
Functor that processed all CORBA sequence elements
def OpenRTM_aist.CORBA_SeqUtil.front (   seq)

Get the front element of the CORBA sequence.

This operation returns seq[0].

Parameters
seqThe CORBA sequence to be get the element
def OpenRTM_aist.CORBA_SeqUtil.insert (   seq,
  elem,
  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
def OpenRTM_aist.CORBA_SeqUtil.push_back (   seq,
  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