Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::IIncrementalItemSourceConnectivity Class Referenceabstract

Interface for the source of an incremental connectivity. More...

#include <arcane/core/IIncrementalItemConnectivity.h>

Public Member Functions

virtual IItemFamilysourceFamily () const =0
 Source family.
virtual void notifySourceFamilyLocalIdChanged (Int32ConstArrayView new_to_old_ids)=0
 Notifies the connectivity that the source family has been compacted.
virtual void notifySourceItemAdded (ItemLocalId item)=0
 Notifies the connectivity that an entity has been added to the source family.
virtual void reserveMemoryForNbSourceItems (Int32 n, bool pre_alloc_connectivity)
 Reserves memory for n source entities.
virtual void notifyReadFromDump ()=0
 Notifies the connectivity that a read has been performed from a dump.
virtual Ref< IIncrementalItemSourceConnectivitytoSourceReference ()=0
 Returns a reference to the instance.

Detailed Description

Interface for the source of an incremental connectivity.

Definition at line 34 of file IIncrementalItemConnectivity.h.

Member Function Documentation

◆ reserveMemoryForNbSourceItems()

void Arcane::IIncrementalItemSourceConnectivity::reserveMemoryForNbSourceItems ( Int32 n,
bool pre_alloc_connectivity )
virtual

Reserves memory for n source entities.

Calling this method is optional but prevents multiple reallocations during successive calls to notifySourceItemAdded().

If pre_alloc_connectivity is true, it also pre-allocates the list of connectivities based on the value of preAllocatedSize(). For example, if preAllocatedSize() is 4 and n is 10000, we will pre-allocate for 40000 connectivities. To avoid unnecessary memory overconsumption, connectivities should only be pre-allocated if we are sure we will use them.

Definition at line 242 of file InterfaceImpl.cc.

Referenced by notifySourceItemAdded().


The documentation for this class was generated from the following files: