5 #include <PyHeliosUtils.h>
16 std::vector<std::string> *vec =
nullptr;
21 PyStringVector(std::vector<std::string> *vec) : vec(vec), release(
false) {}
23 this->vec =
new std::vector<std::string>(vec);
26 virtual ~
PyStringVector(){
if(release && vec !=
nullptr) free(vec);}
30 std::string get(
long _index){
34 void set(
long _index, std::string value){
36 (*vec)[index] = value;
38 void insert(std::string value){vec->push_back(value);}
39 void erase(
long _index){
41 vec->erase(vec->begin() + index);
43 size_t length() {
return vec->size();}
static size_t handlePythonIndex(long _index, size_t n)
Translate received index from python, where negative values have a special meaning (i....
Definition: PyHeliosUtils.h:16
Definition: PyStringVector.h:12