Class BasePropertyArray

Inheritance Relationships

Derived Type

Class Documentation

class BasePropertyArray

Subclassed by pmp::PropertyArray< T >

Public Functions

inline BasePropertyArray(const std::string &name)

Default constructor.

inline virtual ~BasePropertyArray()

Destructor.

virtual void reserve(size_t n) = 0

Reserve memory for n elements.

virtual void resize(size_t n) = 0

Resize storage to hold n elements.

virtual void free_memory() = 0

Free unused memory.

virtual void shallow_clear() = 0

Erase the contents of the property without calling destructors.

virtual void swap(size_t i0, size_t i1) = 0

Let two elements swap their storage place.

virtual void copy_prop(const BasePropertyArray *src, size_t src_i, size_t dst_i) = 0

Copy an element from another array.

virtual BasePropertyArray *clone() const = 0

Return a deep copy of self.

virtual BasePropertyArray *empty_copy() const = 0

Return an empty copy of self.

inline void unload(HighFive::Group &group)

Write contents into group and clear the array.

inline void restore(const HighFive::Group &group)

Restore contents from group after unload().

virtual const std::type_info &type() const = 0

Return the type_info of the property.

inline const std::string &name() const

Return the name of the property.

Protected Functions

virtual std::pair<uint8_t*, size_t> raw_data() = 0

Return the raw data pointer and length.

Protected Attributes

std::string name_