37 T*
at(
unsigned int pos);
39 const
T*
at(
unsigned int pos) const;
41 void swap(
unsigned int i,
unsigned int j) override;
49 void replace(
WEMPrimitive *wp,
unsigned int pos) override;
77 return reinterpret_cast<T*
>(wp);
103 const unsigned int n = num();
105 for (
unsigned int i=0;i<n;i++)
124 at(i)->setHeapPosition(i);
125 at(j)->setHeapPosition(j);
133 if (wp ==
nullptr) {
return (num()-1); }
137 last()->setHeapPosition(num()-1);
158 if (wp ==
nullptr) {
return -1; }
161 if (i >= n) {
return -1; }
162 if (i <= -1) {
return -1; }
168 at(n - 1)->setHeapPosition(-1);
Container with the ability to detect double inserts.
WEMContainer(WEMContainer &&) noexcept=default
This is the base class for the WEM elements nodes, edges, and faces.
int getHeapPosition() const
Returns the heap position.
void setHeapPosition(int heapPosition)
Sets the heap position.
Dynamic templated vector.
IteratorTraits::value_type & at(const ml_iterator_map< IteratorTraits, IDMap > &i, typename property_traits< IDMap >::key_type key)
void init()
Initializes the ML, the runtime type system, the memory manager, fields, static buffers,...
void destroy()
Delete dynamic data structures allocated by init().