Easy3D 2.5.3
|
Implementation of a generic property array. More...
Public Types | |
typedef T | value_type |
typedef std::vector< value_type > | vector_type |
typedef vector_type::reference | reference |
typedef vector_type::const_reference | const_reference |
Public Member Functions | |
PropertyArray (const std::string &name, T t=T()) | |
void | reserve (size_t n) override |
Reserve memory for n elements. More... | |
void | resize (size_t n) override |
Resize storage to hold n elements. More... | |
void | push_back () override |
Extend the number of elements by one. More... | |
void | reset (size_t idx) override |
Reset element to default value. More... | |
bool | transfer (const BasePropertyArray &other) override |
Copy the entire properties from other . More... | |
bool | transfer (const BasePropertyArray &other, std::size_t from, std::size_t to) override |
Copy the property[from] of other to this->property[to]. More... | |
void | shrink_to_fit () override |
Free unused memory. More... | |
void | swap (size_t i0, size_t i1) override |
Let two elements swap their storage place. More... | |
void | copy (size_t from, size_t to) override |
Let copy 'from' -> 'to'. More... | |
BasePropertyArray * | clone () const override |
Return a deep copy of self. More... | |
BasePropertyArray * | empty_clone () const override |
Return a empty copy of self. More... | |
const std::type_info & | type () const override |
Return the type_info of the property. More... | |
const T * | data () const |
Get pointer to array (does not work for T==bool) | |
std::vector< T > & | vector () |
Get reference to the underlying vector. | |
reference | operator[] (size_t _idx) |
Access the i'th element. No range check is performed! | |
const_reference | operator[] (size_t _idx) const |
Const access to the i'th element. No range check is performed! | |
const bool * | data () const |
Public Member Functions inherited from BasePropertyArray | |
BasePropertyArray (const std::string &name) | |
Default constructor. | |
virtual | ~BasePropertyArray ()=default |
Destructor. | |
virtual void | reserve (size_t n)=0 |
Reserve memory for n elements. More... | |
virtual void | resize (size_t n)=0 |
Resize storage to hold n elements. More... | |
virtual void | shrink_to_fit ()=0 |
Free unused memory. More... | |
virtual void | push_back ()=0 |
Extend the number of elements by one. More... | |
virtual void | reset (size_t idx)=0 |
Reset element to default value. More... | |
virtual bool | transfer (const BasePropertyArray &other)=0 |
Copy the entire properties from other . More... | |
virtual bool | transfer (const BasePropertyArray &other, std::size_t from, std::size_t to)=0 |
Copy the property[from] of other to this->property[to]. More... | |
virtual void | swap (size_t i0, size_t i1)=0 |
Let two elements swap their storage place. More... | |
virtual void | copy (size_t from, size_t to)=0 |
Let copy 'from' -> 'to'. More... | |
virtual BasePropertyArray * | clone () const =0 |
Return a deep copy of self. More... | |
virtual BasePropertyArray * | empty_clone () const =0 |
Return a empty copy of self. More... | |
virtual const std::type_info & | type () const =0 |
Return the type_info of the property. More... | |
const std::string & | name () const |
Return the name of the property. | |
void | set_name (const std::string &n) |
Set the name of the property. | |
bool | is_same (const BasePropertyArray &other) const |
Implementation of a generic property array.
|
inlineoverridevirtual |
Return a deep copy of self.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Let copy 'from' -> 'to'.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Return a empty copy of self.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Extend the number of elements by one.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Reserve memory for n elements.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Reset element to default value.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Resize storage to hold n elements.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Free unused memory.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Let two elements swap their storage place.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Copy the entire properties from other
.
Implements BasePropertyArray.
|
inlineoverridevirtual |
Copy the property[from] of other
to this->property[to].
Implements BasePropertyArray.
|
inlineoverridevirtual |
Return the type_info of the property.
Implements BasePropertyArray.