Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ItemPairGroupImpl.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/* ItemPairGroupImpl.h (C) 2000-2025 */
9/* */
10/* Implementation of an array of lists of entities. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ITEMPAIRGROUPIMPL_H
13#define ARCANE_CORE_ITEMPAIRGROUPIMPL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18#include "arcane/core/SharedReference.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
34class ARCANE_CORE_EXPORT ItemPairGroupImpl
35: public SharedReference
36{
37 public:
38
39 ItemPairGroupImpl();
40 ItemPairGroupImpl(const ItemGroup& group, const ItemGroup& sub_group);
41 ~ItemPairGroupImpl() override;
42
43 public:
44
45 static ItemPairGroupImpl* shared_null;
46 static ItemPairGroupImpl* checkSharedNull();
47
48 public:
49
50 virtual ISharedReference& sharedReference() { return *this; }
51
52 public:
53
55 const String& name() const;
56
58 virtual Integer nbRef() const { return refCount(); }
59
61 bool null() const;
62
64 IMesh* mesh() const;
65
67 eItemKind itemKind() const;
68
70 eItemKind subItemKind() const;
71
73 IItemFamily* itemFamily() const;
74
76 IItemFamily* subItemFamily() const;
77
79 const ItemGroup& itemGroup() const;
80
82 const ItemGroup& subItemGroup() const;
83
85 Integer size() const;
86
88 void invalidate(bool force_recompute);
89
91 void checkValid();
92
101 bool checkNeedUpdate();
102
104 void changeIds(IntegerConstArrayView old_to_new_ids);
105
110
115
119 void setComputeFunctor(IFunctor* functor);
120
121 Int64ArrayView indexes();
122
123 Span<const Int32> subItemsLocalId();
124
125 private:
126
128
129 public:
130
131 void addRef() override;
132 void removeRef() override;
133
134 private:
135
136 void deleteMe() override;
137};
138
139/*---------------------------------------------------------------------------*/
140/*---------------------------------------------------------------------------*/
141
142} // namespace Arcane
143
144/*---------------------------------------------------------------------------*/
145/*---------------------------------------------------------------------------*/
146
147#endif
Declarations of types on entities.
Base class for 1D data vectors.
Interface of an entity family.
Definition IItemFamily.h:83
Interface of a reference counter.
Mesh entity group.
Definition ItemGroup.h:51
ItemPairGroupImplPrivate * m_p
Group implementation.
Integer size() const
Number of entities in the group.
const String & name() const
Group name.
bool checkNeedUpdate()
Updates the group if necessary.
void checkValid()
Checks that the group is valid.
Array< Int32 > & unguardedLocalIds() const
virtual Integer nbRef() const
Number of references on the group.
void removeRef() override
Decrements the reference counter.
Array< Int64 > & unguardedIndexes() const
void addRef() override
Increments the reference counter.
void changeIds(IntegerConstArrayView old_to_new_ids)
Changes the indices of the group's entities.
void invalidate(bool force_recompute)
Invalidates the group.
void setComputeFunctor(IFunctor *functor)
Int32 refCount() const override
Returns the value of the reference counter.
View of an array of elements of type T.
Definition Span.h:635
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ArrayView< Int64 > Int64ArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:451
Int32 Integer
Type representing an integer.
eItemKind
Mesh entity type.
ConstArrayView< Integer > IntegerConstArrayView
C equivalent of a 1D array of integers.
Definition UtilsTypes.h:486