Variable size string array class. More...
#include <Vrekrer_scpi_parser.h>
Public Member Functions | |
char * | operator[] (const byte index) |
Add indexing capability. | |
void | Append (char *value) |
Append new string (LIFO stack Push). | |
char * | Pop () |
LIFO stack Pop. | |
char * | First () |
Returns the first element of the array. | |
char * | Last () |
Returns the last element of the array. | |
uint8_t | Size () |
Array size. | |
Protected Attributes | |
uint8_t | size_ = 0 |
char * | values_ [SCPI_ARRAY_SYZE] |
Variable size string array class.
The array must be filled using the Append
method (acts as a LIFO stack Push).
Values can be extracted (and removed) using the Pop
function (LIFO stack Pop).
Both Append
and Pop
modifies the Size
of the array.
Values can be read (without removing them) using the following methods:
First()
: Returns the first value appended to the array. Last()
: Returns the last value appended to the array. my_array
[1] to get the second value of the array).The max size of the array is defined by SCPI_ARRAY_SYZE
(default 6).