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:

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 42 of file Vector.h.

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
 
virtual bool read (yarp::os::ConnectionReader &connection) override
 Read this object from a network connection. More...
 
virtual 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
 

Additional Inherited Members

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

Member Function Documentation

◆ getBottleTag()

◆ getElementSize()

◆ getListSize()

◆ getMemoryBlock() [1/2]

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

◆ getMemoryBlock() [2/2]

◆ 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 44 of file Vector.cpp.

◆ resize()

◆ 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 67 of file Vector.cpp.


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