Commit 29a2730e authored by Martin Heistermann's avatar Martin Heistermann
Browse files

implement property size()

parent bc45b8c5
...@@ -88,6 +88,8 @@ public: ...@@ -88,6 +88,8 @@ public:
virtual const std::string typeNameWrapper() const = 0; virtual const std::string typeNameWrapper() const = 0;
virtual size_t size() const = 0;
protected: protected:
virtual void delete_multiple_entries(const std::vector<bool>& _tags) = 0; virtual void delete_multiple_entries(const std::vector<bool>& _tags) = 0;
......
...@@ -88,6 +88,9 @@ public: ...@@ -88,6 +88,9 @@ public:
virtual void resize(size_t _n) { virtual void resize(size_t _n) {
data_.resize(_n, def_); data_.resize(_n, def_);
} }
virtual size_t size() const {
return data_.size();
}
virtual void clear() { virtual void clear() {
data_.clear(); data_.clear();
vector_type().swap(data_); vector_type().swap(data_);
......
...@@ -91,6 +91,7 @@ public: ...@@ -91,6 +91,7 @@ public:
const_iterator begin() const { return ptr::shared_ptr<PropT>::get()->begin(); } const_iterator begin() const { return ptr::shared_ptr<PropT>::get()->begin(); }
iterator begin() { return ptr::shared_ptr<PropT>::get()->begin(); } iterator begin() { return ptr::shared_ptr<PropT>::get()->begin(); }
size_t size() const { return ptr::shared_ptr<PropT>::get()->size(); }
const_iterator end() const { return ptr::shared_ptr<PropT>::get()->end(); } const_iterator end() const { return ptr::shared_ptr<PropT>::get()->end(); }
iterator end() { return ptr::shared_ptr<PropT>::get()->end(); } iterator end() { return ptr::shared_ptr<PropT>::get()->end(); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment