Actin  Version 5.5.2
Software for Robotics Simulation and Control
EcXmlVectorType< ElementType > Class Template Reference

A template class that is XML readable/writable for holding vectors of XML objects. More...

#include <ecXmlVectorType.h>

Inherits EcXmlObject.

Inherited by EcManipulationWaypointVector, and EcPlanarShapeVector.

Collaboration diagram for EcXmlVectorType< ElementType >:
[legend]

Public Types

typedef std::vector< ElementType > VectorContainer
 VectorContainer type from std::vector.
 

Public Member Functions

 ECXMLOBJECT (EcXmlVectorType)
 ECXMLOBJECT(cls) EcXmlObject class convenience macro
 
 EcXmlVectorType (EcSizeT size)
 constructor of vector size
 
 EcXmlVectorType (EcSizeT size, ElementType val)
 
virtual const ElementType & operator[] (EcSizeT index) const
 get by index
 
virtual ElementType & operator[] (EcSizeT index)
 set by index
 
virtual const ElementType & back () const
 get back
 
virtual ElementType & back ()
 get back
 
virtual void pushBack (const ElementType &element)
 push a copy of an object onto the vector
 
virtual EcBoolean erase (const EcSizeT index)
 erase one element
 
virtual EcBoolean erase (const EcSizeT first, const EcSizeT last)
 erase a range of elements
 
virtual const VectorContainervectorContainer () const
 get the vector container
 
virtual VectorContainervectorContainer ()
 get the vector container – nonconst
 
virtual void reserve (EcSizeT size)
 reserve space in the vector container
 
virtual void resize (EcSizeT size)
 resize the vector container
 
virtual void resizeToAtLeast (EcSizeT size)
 grow the vector container if necessary, but do not shrink
 
virtual void clear ()
 clear all entries in the vector container
 
virtual void assign (EcSizeT size, const ElementType &obj)
 assign an object to a range of values
 
virtual EcSizeT size () const
 get the length of the vector
 
virtual EcBoolean leftRotate (EcSizeT amount)
 
virtual EcBoolean read (EcXmlReader &stream) EC_OVERRIDE
 read this object from an XML stream
 
virtual EcBoolean write (EcXmlWriter &stream) const EC_OVERRIDE
 write this object to an XML stream
 
virtual EcBoolean writeSchema (EcXmlSchema &stream) const EC_OVERRIDE
 write schema
 
virtual EcBoolean writeHeaderToStream (std::ostream &stream, EcXmlWriter *&pWriter, const EcString &streamName, const EcToken &objectName=EcXml::EcDefaultToken) const
 write the header for this object to an ostream
 
virtual EcBoolean writeBodyToStream (EcXmlWriter *pWriter) const
 write the body (the elements) of this vector to an ostream
 
virtual EcBoolean appendElementToStream (EcXmlWriter *pWriter, const ElementType &element) const
 append an element to an ostream
 
virtual EcBoolean writeFooterToStream (EcXmlWriter *&pWriter) const
 
virtual void append (const EcXmlVectorType< ElementType > &other)
 append the passed in vector to the end of this vector
 
- Public Member Functions inherited from EcXmlObject
 ECDECLARE_BIGFOUR (EcXmlObject)
 
virtual EcXmlObjectclone () const =0
 clone
 
virtual EcBoolean xmlInit ()
 xml-initialize
 
virtual EcBoolean readAttribute (EcXmlReader &stream)
 read this attribute from an XML stream
 
virtual EcBoolean createSchema (const EcString &filename, const EcToken &objectName=EcXml::EcDefaultToken) const
 create schema
 
virtual EcBoolean xmlInitialized () const
 get XML initialized flag. This bit is set on initialization.
 
virtual void setXmlInitialized (EcBoolean val=EcTrue)
 set XML initialized flag. This bit is set on initialization.
 
virtual EcBoolean specified () const
 get specified flag. This bit is set upon reading from an XML file.
 
virtual void setSpecified (EcBoolean val=EcTrue)
 set specified flag. This bit is set upon reading from an XML file.
 
virtual EcBoolean isBasicType () const
 Return true/false for basic type.
 
virtual EcBoolean equalsDefault () const
 tests equality of XML object with default
 
virtual EcBoolean equality (const EcXmlObject *other) const =0
 equality - a virtual equality to an EcXmlObject pointer
 
virtual EcXmlObjectnewObject () const =0
 creates new object - a virtual new to an EcXmlObject pointer
 
virtual const EcTokentoken () const =0
 gets the xml token used for writing out.
 

Static Public Member Functions

static EcXmlVectorType< ElementType > nullObject ()
 get a null vector
 

Protected Attributes

VectorContainer m_VectorContainer
 XML data.
 
- Protected Attributes inherited from EcXmlObject
EcU8 m_State
 the state of the object - eight boolean flags
 

Additional Inherited Members

- Static Protected Attributes inherited from EcXmlObject
static const EcU8 m_theXmlInitializedBit
 the bit used to describe xml initialization
 
static const EcU8 m_theSpecifiedBit
 the bit used to describe specification
 

Detailed Description

template<class ElementType>
class EcXmlVectorType< ElementType >

A template class that is XML readable/writable for holding vectors of XML objects.

Definition at line 16 of file ecXmlVectorType.h.

Constructor & Destructor Documentation

template<class ElementType>
EcXmlVectorType< ElementType >::EcXmlVectorType ( EcSizeT  size,
ElementType  val 
)

constructor of vector size with elements initialized to val

Member Function Documentation

template<class ElementType>
virtual EcBoolean EcXmlVectorType< ElementType >::leftRotate ( EcSizeT  amount)
virtual

left rotate by the specified amount returns true if successful

template<class ElementType>
virtual EcBoolean EcXmlVectorType< ElementType >::writeFooterToStream ( EcXmlWriter *&  pWriter) const
virtual

write the footer of this object to an ostream and free the memory in the writer


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