12#ifndef ARCANE_MESH_CONNECTIVITYNEWWITHDEPENDENCIESINFO_H
13#define ARCANE_MESH_CONNECTIVITYNEWWITHDEPENDENCIESINFO_H
21#include "arcane/core/IIncrementalItemConnectivity.h"
23#include "arcane/mesh/MeshGlobal.h"
24#include "arcane/mesh/ConnectivityNewWithDependenciesTypes.h"
25#include "arcane/mesh/IncrementalItemConnectivity.h"
26#include "arcane/mesh/CompactIncrementalItemConnectivity.h"
27#include "arcane/mesh/ItemConnectivitySelector.h"
46template <
class SourceFamily,
class TargetFamily,
class LegacyType,
class CustomType = IncrementalItemConnectivity>
47class ARCANE_MESH_EXPORT NewWithLegacyConnectivity
48:
public ItemConnectivitySelectorT<LegacyType, CustomType>
56 friend class ConnectivityItemVector;
61 : ItemConnectivitySelectorT<LegacyType, CustomType>(source_family, target_family,
name)
64 Base::template build<SourceFamily, TargetFamily>();
67 typedef ItemConnectivitySelectorT<LegacyType, CustomType> Base;
69 String name()
const override {
return Base::trueCustomConnectivity()->name(); }
126 void dumpStats(std::ostream& out)
const override { Base::trueCustomConnectivity()->dumpStats(out); }
147 return Base::trueCustomConnectivity()->_internalApi();
153 void _initializeStorage(ConnectivityItemVector* civ)
override { Base::trueCustomConnectivity()->_initializeStorage(civ); };
159template <
class SourceFamily,
class TargetFamily>
Arcane configuration file.
#define ARCCORE_DEFINE_REFERENCE_COUNTED_INCLASS_METHODS()
Macro to define methods managing counters of references.
Constant view of an array of type T.
Internal Arcane API for IIncrementalItemConnectivity.
Interface for managing an incremental connectivity.
Interface of an entity family.
Index of an Item in a variable.
View on a vector of entities.
Reference to an instance.
Thread-safe implementation of a reference counter.
Unicode character string.
class holding a new connectivity but also filling the legacy one Both custom and legacy connectivitie...
ItemVectorView _connectedItems(ItemLocalId item, ConnectivityItemVector &con_items) const override
Fills con_items with the entities connected to item.
IItemFamily * sourceFamily() const override
Source family.
void _initializeStorage(ConnectivityItemVector *civ) override
Implements the initialization of civ for this connectivity.
void replaceConnectedItem(ItemLocalId source_item, Integer index, ItemLocalId target_local_id) override
Replaces the entity at index index of source_item with the entity with localId() target_local_id.
void setPreAllocatedSize(Integer value) override
Sets the number of entities to pre-allocate for the connectivity of each entity.
String name() const override
Name of the connectivity.
void removeConnectedItems(ItemLocalId source_item) override
Removes all entities connected to source_item.
void notifyTargetFamilyLocalIdChanged(Int32ConstArrayView old_to_new_ids) override
Notifies the connectivity that the target family has been compacted.
void dumpStats(std::ostream &out) const override
Dumps statistics on usage and memory used to the stream out.
void notifySourceItemAdded(ItemLocalId item) override
Notifies the connectivity that an entity has been added to the source family.
bool hasConnectedItem(ItemLocalId source_item, ItemLocalId target_local_id) const override
Tests the existence of a connectivity between source_item and the entity with localId() target_local_...
void addConnectedItem(ItemLocalId source_item, ItemLocalId target_local_id) override
Adds the entity with localId() target_local_id to the connectivity of source_item.
Ref< IIncrementalItemTargetConnectivity > toTargetReference() override
Returns a reference to the instance.
void notifyReadFromDump() override
Notifies the connectivity that a read from a dump has been performed.
IItemFamily * targetFamily() const override
Target family.
Integer nbConnectedItem(ItemLocalId lid) const override
Number of entities connected to the source entity with local number lid.
void replaceConnectedItems(ItemLocalId source_item, Int32ConstArrayView target_local_ids) override
Replaces the entities of source_item with the entities with localId() target_local_ids.
Ref< IIncrementalItemSourceConnectivity > toSourceReference() override
Returns a reference to the instance.
Int32 connectedItemLocalId(ItemLocalId lid, Integer index) const override
localId() of the index-th entity connected to the source entity with local number lid
Integer preAllocatedSize() const override
Number of pre-allocated entities for the connectivity of each entity.
Int32 maxNbConnectedItem() const override
Maximum number of entities connected to a source entity.
void removeConnectedItem(ItemLocalId source_item, ItemLocalId target_local_id) override
Removes the entity with localId() target_local_id from the connectivity of source_item.
void notifySourceFamilyLocalIdChanged(Int32ConstArrayView new_to_old_ids) override
Notifies the connectivity that the source family has been compacted.
IIncrementalItemConnectivityInternal * _internalApi() override
Internal Arcane API.
ConstArrayView< IItemFamily * > families() const override
List of families (sourceFamily() + targetFamily()).
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
std::int32_t Int32
Signed integer type of 32 bits.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.