|
| VectorOf ()=default |
|
| VectorOf (size_t size) |
|
| VectorOf (std::initializer_list< T > values) |
| Initializer list constructor. More...
|
|
| VectorOf (size_t s, const T &def) |
| Build a vector and initialize it with def. More...
|
|
| VectorOf (size_t s, const T *p) |
| Builds a vector and initialize it with values from 'p'. More...
|
|
| VectorOf (const VectorOf &r) |
|
const VectorOf< T > & | operator= (const VectorOf< T > &r) |
| Copy operator;. More...
|
|
| VectorOf (VectorOf< T > &&other) noexcept |
| Move constructor. More...
|
|
VectorOf & | operator= (VectorOf< T > &&other) noexcept |
| Move assignment operator. More...
|
|
size_t | getElementSize () const override |
|
int | getBottleTag () const override |
|
size_t | getListSize () const override |
|
const char * | getMemoryBlock () const override |
|
char * | getMemoryBlock () override |
|
const T * | getFirst () const |
|
T * | getFirst () |
|
T * | data () |
| Return a pointer to the first element of the vector. More...
|
|
const T * | data () const |
| Return a pointer to the first element of the vector, const version. More...
|
|
void | resize (size_t size) override |
| Resize the vector. More...
|
|
void | resize (size_t size, const T &def) |
| Resize the vector and initilize the element to a default value. More...
|
|
void | reserve (size_t size) |
| reserve, increase the capacity of the vector to a value that's greater or equal to size. More...
|
|
void | push_back (const T &elem) |
| Push a new element in the vector: size is changed. More...
|
|
void | push_back (T &&elem) |
| Move a new element in the vector: size is changed. More...
|
|
template<typename... _Args> |
T & | emplace_back (_Args &&... args) |
| Construct a new element in the vector: size is changed. More...
|
|
void | pop_back () |
| Pop an element out of the vector: size is changed. More...
|
|
T & | operator[] (size_t i) |
| Single element access, no range check. More...
|
|
const T & | operator[] (size_t i) const |
| Single element access, no range check, const version. More...
|
|
T & | operator() (size_t i) |
| Single element access, no range check. More...
|
|
const T & | operator() (size_t i) const |
| Single element access, no range check, const version. More...
|
|
size_t | size () const |
|
size_t | length () const |
| Get the length of the vector. More...
|
|
size_t | capacity () const |
| capacity More...
|
|
void | zero () |
| Zero the elements of the vector. More...
|
|
std::string | toString (int precision=-1, int width=-1) const |
| Creates a string object containing a text representation of the object. More...
|
|
VectorOf< T > | 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. More...
|
|
bool | setSubvector (int position, const VectorOf< T > &v) |
| Set a portion of this vector with the values of the specified vector. More...
|
|
const VectorOf< T > & | operator= (T v) |
| Set all elements of the vector to a scalar. More...
|
|
bool | operator== (const VectorOf< T > &r) const |
| True iff all elements of 'a' match all element of 'b'. More...
|
|
iterator | begin () noexcept |
| Returns an iterator to the beginning of the VectorOf. More...
|
|
iterator | end () noexcept |
| Returns an iterator to the end of the VectorOf. More...
|
|
const_iterator | begin () const noexcept |
| Returns a const iterator to the beginning of the VectorOf. More...
|
|
const_iterator | end () const noexcept |
| Returns a const iterator to the end of the VectorOf. More...
|
|
const_iterator | cbegin () const noexcept |
| Returns a const iterator to the beginning of the VectorOf. More...
|
|
const_iterator | cend () const noexcept |
| Returns a const iterator to the end of the VectorOf. More...
|
|
void | clear () |
|
yarp::os::Type | getType () const override |
|
template<class T>
class yarp::sig::VectorOf< T >
Provides:
- push_back(), pop_back() to add/remove an element at the end of the vector
- resize(), to create an array of elements
- clear(), to clean the array (remove all elements)
- use [] to access single elements without range checking
- use size() to get the current size of the Vector
- use operator= to copy Vectors
- read/write network methods Warning: the class is designed to work with simple types (i.e. types that do not allocate internal memory). Template instantiation needs to be checked to avoid unresolved externals. Network communication assumes same data representation (endianness) between machines.
Definition at line 121 of file Vector.h.