29.04.2014 - Version 0.4.0_prealpha. PICodeParser, namespace PICodeInfo, new tool "pip_cmg" in dir "code_model_generator". New feature in PIIODevice - "createFromFullPath", all parameters of all I/O devices now works with PIObjects`s properties.

This commit is contained in:
peri4
2014-04-29 11:50:13 +04:00
parent 77abb0bbea
commit 2e5e75c4c4
98 changed files with 2545 additions and 768 deletions

View File

@@ -6,7 +6,7 @@
/*
PIP - Platform Independent Primitives
Dynamic array of any type
Copyright (C) 2013 Ivan Pelipenko peri4ko@gmail.com
Copyright (C) 2014 Ivan Pelipenko peri4ko@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -201,7 +201,7 @@ public:
return *this;
}
PIVector<T> & assign(const T & f = T()) {return fill(f);}
PIVector<T> & assign(size_t new_size, const T & f) {resize(new_size); fill(f);}
PIVector<T> & assign(size_t new_size, const T & f) {resize(new_size); return fill(f);}
PIVector<T> & resize(size_t new_size, const T & f = T()) {
if (new_size < piv_size) {
T * de = &(piv_data[new_size]);
@@ -261,6 +261,13 @@ public:
PIVector<T> & push_back(const T & v) {alloc(piv_size + 1); new(piv_data + piv_size - 1)T(v); return *this;}
PIVector<T> & append(const T & v) {return push_back(v);}
PIVector<T> & operator <<(const T & v) {return push_back(v);}
PIVector<T> & operator <<(const PIVector<T> & t) {
size_t ps = piv_size;
alloc(piv_size + t.piv_size);
for (int i = 0; i < t.piv_size; ++i)
new(piv_data + ps + i)T(t.piv_data[i]);
return *this;
}
PIVector<T> & push_front(const T & v) {insert(0, v); return *this;}
PIVector<T> & prepend(const T & v) {return push_front(v);}