Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IItemConnectivityAccessor.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IItemConnectivityAccessor.h (C) 2000-2025 */
9/* */
10/* Interface for entity connectivity accessors. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IITEMCONNECTIVITYACCESSOR_H
13#define ARCANE_CORE_IITEMCONNECTIVITYACCESSOR_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/ArrayView.h"
18#include "arcane/utils/String.h"
19
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31/*!
32 * \brief Interface to manage access to a connectivity.
33 */
34class ARCANE_CORE_EXPORT IItemConnectivityAccessor
35{
36 friend ConnectivityItemVector;
37
38 public:
39
40 virtual ~IItemConnectivityAccessor() = default;
41
42 public:
43
44 //! Number of entities connected to the source entity with local ID \a lid
45 virtual Integer nbConnectedItem(ItemLocalId lid) const = 0;
46
47 //! localId() of the \a index-th entity connected to the source entity with local ID \a lid
48 virtual Int32 connectedItemLocalId(ItemLocalId lid, Integer index) const = 0;
49
50 protected:
51
52 //! Implements the initialization of \a civ for this connectivity.
53 virtual void _initializeStorage(ConnectivityItemVector* civ) = 0;
54
55 //! Fills \a con_items with the entities connected to \a item.
56 virtual ItemVectorView _connectedItems(ItemLocalId item, ConnectivityItemVector& con_items) const = 0;
57};
58
59/*---------------------------------------------------------------------------*/
60/*---------------------------------------------------------------------------*/
61
62} // namespace Arcane
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
67#endif
Declarations of types on entities.
Interface to manage access to a connectivity.
virtual ItemVectorView _connectedItems(ItemLocalId item, ConnectivityItemVector &con_items) const =0
Fills con_items with the entities connected to item.
virtual Int32 connectedItemLocalId(ItemLocalId lid, Integer index) const =0
localId() of the index-th entity connected to the source entity with local ID lid
virtual void _initializeStorage(ConnectivityItemVector *civ)=0
Implements the initialization of civ for this connectivity.
virtual Integer nbConnectedItem(ItemLocalId lid) const =0
Number of entities connected to the source entity with local ID lid.
Index of an Item in a variable.
Definition ItemLocalId.h:42
View on a vector of entities.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
std::int32_t Int32
Signed integer type of 32 bits.