Actin®  Version 5.3.0
Software for Robotics Simulation and Control
EcXmlVectorBasicType< ElementType > Class Template Reference

A template class that is XML readable/writable for holding vectors of basic XML objects. Underlying container is vector of basic non-xml type. More...

#include <ecXmlVectorBasicType.h>

Inheritance diagram for EcXmlVectorBasicType< ElementType >:
[legend]
Collaboration diagram for EcXmlVectorBasicType< ElementType >:
[legend]

Public Types

typedef ElementType::basic_type basic_type
 Underlying non-xml basic_type.
 
typedef std::vector< basic_typeVectorContainer
 VectorContainer type from std::vector of non-xml basic type.
 

Public Member Functions

 ECXMLOBJECT (EcXmlVectorBasicType)
 ECXMLOBJECT(cls) EcXmlObject class convenience macro
 
 EcXmlVectorBasicType (EcSizeT size)
 constructor of vector size
 
 EcXmlVectorBasicType (EcSizeT size, ElementType val)
 
 EcXmlVectorBasicType (EcSizeT size, basic_type val)
 
 EcXmlVectorBasicType (const VectorContainer &vector)
 constructor from vector of basic elements
 
const basic_typeoperator[] (EcSizeT index) const
 get by index
 
basic_typeoperator[] (EcSizeT index)
 set by index
 
virtual void pushBack (const ElementType &element)
 push a copy of an object onto the vector
 
virtual void pushBack (const basic_type &element)
 push a copy of basic type element
 
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 void assign (EcSizeT size, const basic_type &element)
 assign basic element 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 EcXmlVectorBasicType< 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 EcXmlVectorBasicType< ElementType > nullObject ()
 get a null vector
 

Protected Attributes

VectorContainer m_VectorContainer
 Underlying vector of non-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 EcXmlVectorBasicType< ElementType >

A template class that is XML readable/writable for holding vectors of basic XML objects. Underlying container is vector of basic non-xml type.

Definition at line 16 of file ecXmlVectorBasicType.h.

Constructor & Destructor Documentation

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

constructor of vector size with elements initialized to object val

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

constructor of vector size with elements initialized to basic element val

Member Function Documentation

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

left rotate by the specified amount returns true if successful

template<class ElementType>
virtual EcBoolean EcXmlVectorBasicType< 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:
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.