Robox Library for Cpp: BCC/31 module 1.0.0
RLibCpp BCC/31 protocol implementation
|
Class to handle with lists of UserOscilloscopeItem pointers. More...
#include <oscilloscope.h>
Public Member Functions | |
PtrVector () | |
Default constructor. | |
PtrVector (const PtrVector &src) | |
Copy constructor. | |
virtual | ~PtrVector () |
Virtual destructor. | |
PtrVector & | operator= (const PtrVector &src) |
Assigment operator overload. | |
UserOscilloscopeItem * | operator[] (size_t n) |
Returns a reference to the element at position n in the vector container. | |
const UserOscilloscopeItem * | operator[] (size_t n) const |
Returns a reference to the element at position n in the vector container. | |
UserOscilloscopeItem * | at (size_t n) |
Returns a reference to the element at position n in the vector container. | |
const UserOscilloscopeItem * | at (size_t n) const |
Returns a reference to the element at position n in the vector container. | |
UserOscilloscopeItem * | front () const |
Get a reference to the first element in the container. | |
UserOscilloscopeItem * | back () const |
Get a reference to the last element in the container. | |
void | pushBack (const pUserOscilloscopeItem &value) |
Appends the given element value to the end of the container. | |
void | popBack () |
Removes the last element of the container. | |
void | resize (size_t count) |
Resizes the container to contain count elements. The new element will be initialized with default values. | |
void | resize (size_t count, const pUserOscilloscopeItem &value) |
Resizes the container to contain count elements. | |
size_t | size () const |
Get the number of elements in the container. | |
void | clear () |
Erases all elements from the container. After this call, size() returns zero. | |
Class to handle with lists of UserOscilloscopeItem pointers.
PtrVector | ( | ) |
Default constructor.
Copy constructor.
Stored object copied from src will NOT be deleted upon clear or object deletion even if subsequently added with push commands
|
virtual |
Virtual destructor.
This method will delete the stored object too, unless it was create with copy constructor PtrVector(const PtrVector& src) or assigned from other object operator=(const PtrVector& src)
UserOscilloscopeItem * at | ( | size_t | n | ) |
Returns a reference to the element at position n in the vector container.
n | Position of an element in the container. |
const UserOscilloscopeItem * at | ( | size_t | n | ) | const |
Returns a reference to the element at position n in the vector container.
n | Position of an element in the container. |
UserOscilloscopeItem * back | ( | ) | const |
Get a reference to the last element in the container.
void clear | ( | ) |
Erases all elements from the container. After this call, size() returns zero.
This method will delete the stored object too, unless it was create with copy constructor PtrVector(const PtrVector& src) or assigned from other object operator=(const PtrVector& src)
UserOscilloscopeItem * front | ( | ) | const |
Get a reference to the first element in the container.
Assigment operator overload.
src | The source object |
A reference to this object
A reference to this object
Stored object copied from src will NOT be deleted upon clear or object deletion even if subsequently added with push commands
UserOscilloscopeItem * operator[] | ( | size_t | n | ) |
Returns a reference to the element at position n in the vector container.
n | Position of an element in the container. |
const UserOscilloscopeItem * operator[] | ( | size_t | n | ) | const |
Returns a reference to the element at position n in the vector container.
n | Position of an element in the container. |
void popBack | ( | ) |
Removes the last element of the container.
void pushBack | ( | const pUserOscilloscopeItem & | value | ) |
Appends the given element value to the end of the container.
value | The value of the element to append |
Stored object value will be deleted upon clear or object deletion unless this container was create with copy constructor PtrVector(const PtrVector& src) or assigned from other object operator=(const PtrVector& src)
void resize | ( | size_t | count | ) |
Resizes the container to contain count elements. The new element will be initialized with default values.
count | The new size of the container |
void resize | ( | size_t | count, |
const pUserOscilloscopeItem & | value ) |
Resizes the container to contain count elements.
count | The new size of the container |
value | The value to initialize the new elements with |
size_t size | ( | ) | const |
Get the number of elements in the container.