YARP
Yet Another Robot Platform
yarp::sig::VectorBase Class Referenceabstract

A Base class for a VectorOf<T>, provide default implementation for read/write methods. More...

#include <yarp/sig/Vector.h>

+ Inheritance diagram for yarp::sig::VectorBase:

Public Member Functions

virtual size_t getElementSize () const =0
 
virtual int getBottleTag () const =0
 
virtual size_t getListSize () const =0
 
virtual const char * getMemoryBlock () const =0
 
virtual char * getMemoryBlock ()=0
 
virtual void resize (size_t size)=0
 
bool read (yarp::os::ConnectionReader &connection) override
 Read this object from a network connection. More...
 
bool write (yarp::os::ConnectionWriter &connection) const override
 Write vector to a connection. More...
 
- Public Member Functions inherited from yarp::os::Portable
virtual Type getType () const
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
 
virtual Type getReadType () const
 
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
 Destructor. More...
 
virtual void onCompletion () const
 This is called when the port has finished all writing operations. More...
 
virtual void onCommencement () const
 This is called when the port is about to begin writing operations. More...
 
virtual yarp::os::Type getWriteType () const
 

Protected Member Functions

virtual std::string getFormatStr (int tag) const
 

Additional Inherited Members

- Static Public Member Functions inherited from yarp::os::Portable
static bool copyPortable (const PortWriter &writer, PortReader &reader)
 Copy one portable to another, via writing and reading. More...
 

Detailed Description

A Base class for a VectorOf<T>, provide default implementation for read/write methods.

Warning: the current implementation assumes the same representation for data type (endianness).

Definition at line 54 of file Vector.h.

Member Function Documentation

◆ getBottleTag()

virtual int yarp::sig::VectorBase::getBottleTag ( ) const
pure virtual

◆ getElementSize()

virtual size_t yarp::sig::VectorBase::getElementSize ( ) const
pure virtual

◆ getFormatStr()

std::string VectorBase::getFormatStr ( int  tag) const
protectedvirtual

Definition at line 98 of file Vector.cpp.

◆ getListSize()

virtual size_t yarp::sig::VectorBase::getListSize ( ) const
pure virtual

◆ getMemoryBlock() [1/2]

virtual const char* yarp::sig::VectorBase::getMemoryBlock ( ) const
pure virtual

◆ getMemoryBlock() [2/2]

virtual char* yarp::sig::VectorBase::getMemoryBlock ( )
pure virtual

◆ read()

bool VectorBase::read ( yarp::os::ConnectionReader reader)
overridevirtual

Read this object from a network connection.

Override this for your particular class.

Parameters
readeran interface to the network connection for reading
Returns
true iff the object is successfully read

Implements yarp::os::Portable.

Definition at line 54 of file Vector.cpp.

◆ resize()

virtual void yarp::sig::VectorBase::resize ( size_t  size)
pure virtual

◆ write()

bool VectorBase::write ( yarp::os::ConnectionWriter connection) const
overridevirtual

Write vector to a connection.

return true iff a vector was written correctly

Implements yarp::os::Portable.

Definition at line 77 of file Vector.cpp.


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