7#ifndef ITEMGROUPBUILDER_H
8#define ITEMGROUPBUILDER_H
16#include "arcane/utils/String.h"
17#include "arcane/utils/StringBuilder.h"
19#include "arcane/core/ArcaneVersion.h"
20#include "arcane/core/ItemGroup.h"
21#include "arcane/core/IMesh.h"
22#include "arcane/core/IItemFamily.h"
23#include "arcane/core/ItemGroupRangeIterator.h"
30#define STRINGIFY(x) #x
31#define TOSTRING(x) STRINGIFY(x)
35#define IMPLICIT_NAME ItemGroupBuilder_cleanString(__FILE__ "__" TOSTRING(__LINE__), false)
36#define IMPLICIT_UNIQ_NAME ItemGroupBuilder_cleanString(__FILE__ "__" TOSTRING(__LINE__), true)
51 std::set<Integer> m_ids;
59 , m_group_name(groupName)
71 m_ids.insert(enumerator.
localId());
79 while (enumerator.hasNext()) {
80 m_ids.insert(enumerator.itemLocalId());
86 void add(
const T& item)
88 m_ids.insert(item.localId());
96 std::set<Integer>::const_iterator is = m_ids.begin();
99 while (is != m_ids.end()) {
virtual ItemGroup findGroup(const String &name) const =0
Searches for a group.
Iteration range over a group of mesh entities.
Reference to a group of a given kind.
void clear()
Clears the entities of the group.
IItemFamily * itemFamily() const
Entity family to which this group belongs (0 for the null group).
void setItems(Int32ConstArrayView items_local_id)
Sets the entities of the group.
static eItemKind kind()
Entity kind.
Unicode character string.
String getName() const
Group name.
void add(ItemEnumeratorT< T > enumerator)
Add a set of items provided by an enumerator.
virtual ~ItemGroupBuilder()
Destructor.
ItemGroupT< T > buildGroup()
Constructor for the new group.
void add(const T &item)
Add a unique item.
void add(ItemGroupRangeIteratorT< T > enumerator)
Add a set of items provided by an enumerator.
ItemGroupBuilder(IMesh *mesh, const String &groupName)
Constructor.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
UniqueArray< Int32 > Int32UniqueArray
Dynamic 1D array of 32-bit integers.