230 if (!skipDestClear) {
236 if (p->hasStore() || !skipDestClear) {
241 p->setIndex (
index,
this);
273 bcont->
moveAux (bindex, b,
true);
279 b->setIndex (bindex, bcont);
281 a->setIndex (aindex, acont);
297 r.swap (auxid, *acont, aindex, *bcont, bindex, 1);
300 if (!a_ids.
test (auxid)) {
301 r.swap (auxid, *acont, aindex, *bcont, bindex, 1);
321 for (
size_t i = 0; i <
sz; i++)
325 size_t naux = auxid_set.
size();
329 m_auxdata.push_back (
vec.getDataArrayForResort (auxid));
372 size_t auxindex = elt->
index();
381 for (
size_t iid = 0; iid < naux; iid++) {
#define ATHCONTAINERS_ASSERT(X)
Manage index tracking and synchronization of auxiliary data.
std::vector< size_t > vec
bool test(bit_t bit) const
Test to see if a bit is set.
bit_t size() const
Count the number of 1 bits in the set.
Object reference supporting deferred reading from StoreGate.
Base class for elements of a container that can have aux data.
static void clearAuxHelper(AuxVectorData &container, size_t index)
Clear all aux data associated with an element.
static void copyAuxHelper(AuxVectorData &container, size_t index, const ConstAuxElement &other, bool warnUnlocked)
Copy aux data from another object.
const SG::AuxVectorData * container() const
Return the container holding this element.
size_t index() const
Return the index of this element within its container.
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
std::vector< size_t > m_imap
std::vector< SG::auxid_t > m_auxids
void resortElement(size_t idx, SG::AuxElement *elt)
std::vector< void * > m_auxdata
std::vector< size_t > m_rmap
AuxVectorBase()
Default constructor.
void moveAux(size_t index, SG::AuxElement *p, bool clear=false, bool skipDestClear=false)
Set index on an element and copy auxiliary data.
void initAuxVectorBase1(const std::false_type &, SG::OwnershipPolicy, SG::IndexTrackingPolicy)
Initialize index tracking mode — no-auxdata specialization.
void swapElementsAux(size_t aindex, size_t bindex, SG::AuxElement *a, SG::AuxElement *b, AuxVectorBase *bcont)
Swap indices and auxiliary data between two elements.
bool m_trackIndices
Flag if index tracking is enabled.
void resize(size_t size)
Resize the aux data associated with this container.
void setStore(SG::IAuxStore *store)
Set the store associated with this object.
void resize1(const std::false_type &, size_t size)
Resize the aux data associated with this container.
virtual ~AuxVectorBase()
Destructor.
AuxVectorBase & operator=(AuxVectorBase &&rhs)
Move assignment.
void reserve1(const std::false_type &, size_t size)
Change the capacity of the aux data associated with this container.
bool trackIndices() const
Return true if index tracking is enabled for this container.
Manage lookup of vectors of auxiliary data.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items in store associated with this object.
void setStore(SG::IAuxStore *store)
Set the store associated with this object.
bool hasNonConstStore() const
Return true if this object has an associated non-const store.
AuxVectorData & operator=(AuxVectorData &&rhs)
Move assignment.
void clearCache()
Clear the cached aux data pointers.
AuxVectorData()
Constructor.
SG::IAuxStore * getStore()
Return the current store, as a non-const interface.
bool hasStore() const
Return true if this object has an associated store.
Exception — Non-const operation performed on const aux data.
Exception — Attempt to set aux data store on container that doesn't track indices,...
Interface for non-const operations on an auxiliary store.
virtual void reserve(size_t sz)=0
Change the capacity of all aux data vectors.
Interface for const operations on an auxiliary store.
A set of aux data identifiers.
@ ALWAYS_TRACK_INDICES
Always track indices, regardless of the setting of the ownership policy.
@ NEVER_TRACK_INDICES
Never track indices, regardless of the setting of the ownership policy.
@ OWN_ELEMENTS
this data object owns its elements
size_t auxid_t
Identifier for a particular aux data item.
void swap(ElementLinkVector< DOBJ > &lhs, ElementLinkVector< DOBJ > &rhs)