YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::sig::VectorOfString Class Reference

#include <yarp/sig/Vector.h>

+ Inheritance diagram for yarp::sig::VectorOfString:

Protected Member Functions

auto & privVec ()
 
const auto & privVec () const
 

Friends

class VectorBase< VectorOfString, std::string >
 

Additional Inherited Members

- Public Types inherited from yarp::sig::VectorOfStringData
typedef yarp::os::idl::Unwrapped< VectorOfStringData > unwrapped
 
- Public Types inherited from yarp::sig::VectorBase< VectorOfString, std::string >
using value_type = std::string
 
using iterator = typename std::vector< std::string >::iterator
 
using const_iterator = typename std::vector< std::string >::const_iterator
 
- Public Member Functions inherited from yarp::sig::VectorOfStringData
 VectorOfStringData ()=default
 
 VectorOfStringData (const std::vector< std::string > &privdata)
 
bool read (yarp::os::idl::WireReader &reader) override
 
bool read (yarp::os::ConnectionReader &connection) override
 Read this object from a network connection.
 
bool write (const yarp::os::idl::WireWriter &writer) const override
 
bool write (yarp::os::ConnectionWriter &connection) const override
 Write this object to a network connection.
 
std::string toString () const
 
- Public Member Functions inherited from yarp::os::idl::WirePortable
virtual bool readBare (yarp::os::ConnectionReader &reader)
 
virtual bool writeBare (yarp::os::ConnectionWriter &writer) const
 
virtual bool readBottle (yarp::os::ConnectionReader &reader)
 
virtual bool writeBottle (yarp::os::ConnectionWriter &writer) const
 
- Public Member Functions inherited from yarp::os::Portable
virtual Type getType () const
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor.
 
virtual Type getReadType () const
 
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
 Destructor.
 
virtual void onCompletion () const
 This is called when the port has finished all writing operations.
 
virtual void onCommencement () const
 This is called when the port is about to begin writing operations.
 
virtual yarp::os::Type getWriteType () const
 
- Public Member Functions inherited from yarp::sig::VectorBase< VectorOfString, std::string >
 VectorBase ()=default
 
 VectorBase (size_t size)
 
 VectorBase (std::initializer_list< std::string > values)
 Initializer list constructor.
 
 VectorBase (size_t s, const std::string &def)
 Build a vector and initialize it with def.
 
 VectorBase (size_t s, const std::string *p)
 Builds a vector and initialize it with values from 'p'.
 
 VectorBase (const VectorBase &r)=default
 
 VectorBase (VectorBase< VectorOfString, std::string > &&other) noexcept=default
 
VectorBase< VectorOfString, std::string > & operator= (const VectorBase< VectorOfString, std::string > &r)=default
 
VectorBase & operator= (VectorBase< VectorOfString, std::string > &&other) noexcept=default
 
VectorOfString & operator= (const std::string &val)
 
VectorOfString & operator= (std::initializer_list< std::string > values)
 Initializer list assignment.
 
 ~VectorBase ()=default
 
size_t capacity () const
 Returns the capacity of the vector.
 
void reserve (size_t size)
 Reserve space in the vector.
 
void resize (size_t size)
 Resize the vector.
 
void resize (size_t size, const std::string &def)
 Resize the vector and initialize the element to a default value.
 
void pop_back ()
 Pop an element out of the vector: size is changed.
 
std::string & operator[] (size_t i)
 Single element access, no range check.
 
const std::string & operator[] (size_t i) const
 Single element access, no range check, const version.
 
std::string & operator() (size_t i)
 Single element access, no range check.
 
const std::string & operator() (size_t i) const
 Single element access, no range check, const version.
 
size_t size () const
 Returns the number of elements in the vector.
 
void clear ()
 Clear (removes all elements) the vector.
 
void push_back (const std::string &elem)
 Push a new element in the vector: size is changed.
 
void push_back (std::string &&elem)
 Move a new element in the vector: size is changed.
 
std::string * data ()
 Return a pointer to the first element of the vector.
 
const std::string * data () const
 Return a pointer to the first element of the vector, const version.
 
VectorOfString subVector (unsigned int first, unsigned int last) const
 Creates and returns a new vector, being the portion of the original vector defined by the first and last indexes of the items to be included in the subvector.
 
void zero ()
 Set to zero the elements of the vector.
 
iterator begin () noexcept
 Returns an iterator to the beginning of the Vector.
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cbegin () const noexcept
 
void erase (iterator pos)
 Remove an element from the vector.
 
void erase (iterator first, iterator last)
 Remove one or more elements from the vector.
 
size_t getElementSize () const
 
- 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.
 
- Protected Attributes inherited from yarp::sig::VectorOfStringData
std::vector< std::string > privdata {}
 

Detailed Description

Definition at line 117 of file Vector.h.

Member Function Documentation

◆ privVec() [1/2]

auto & yarp::sig::VectorOfString::privVec ( )
inlineprotected

Definition at line 127 of file Vector.h.

◆ privVec() [2/2]

const auto & yarp::sig::VectorOfString::privVec ( ) const
inlineprotected

Definition at line 128 of file Vector.h.

Friends And Related Symbol Documentation

◆ VectorBase< VectorOfString, std::string >

friend class VectorBase< VectorOfString, std::string >
friend

Definition at line 113 of file Vector.h.


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