12#ifndef ARCANE_CORE_ITEMPRINTER_H
13#define ARCANE_CORE_ITEMPRINTER_H
17#include "arcane/utils/Iostream.h"
20#include "arcane/core/Item.h"
34class ARCANE_CORE_EXPORT ItemPrinter
41 , m_has_item_kind(
true)
46 , m_has_item_kind(
false)
48 ItemPrinter(
const Item& item)
49 : m_item(item.itemBase())
51 , m_has_item_kind(
false)
54 : m_item(item.itemBase())
56 , m_has_item_kind(
true)
58 ItemPrinter(
const Node& item)
59 : m_item(item.itemBase())
61 , m_has_item_kind(
true)
63 ItemPrinter(
const Edge& item)
64 : m_item(item.itemBase())
66 , m_has_item_kind(
true)
68 ItemPrinter(
const Face& item)
69 : m_item(item.itemBase())
71 , m_has_item_kind(
true)
73 ItemPrinter(
const Cell& item)
74 : m_item(item.itemBase())
76 , m_has_item_kind(
true)
79 : m_item(item.itemBase())
81 , m_has_item_kind(
true)
87 void print(std::ostream& o)
const;
91 impl::ItemBase m_item;
103class ARCANE_CORE_EXPORT FullItemPrinter
107 explicit FullItemPrinter(
const Item& item)
112 void print(std::ostream& o)
const;
116 impl::ItemBase m_item;
122class ARCANE_CORE_EXPORT NeighborItemPrinter
126 explicit NeighborItemPrinter(
Item item,
const Integer levelmax = 1)
128 , m_level_max(levelmax)
132 void print(std::ostream& o)
const {
print(o, m_item, m_level_max, m_level_max); }
136 impl::ItemBase m_item;
141 static std::ostream& indent(std::ostream& o,
Integer n);
143 static void _printSubItems(std::ostream& ostr,
Integer level,
Integer levelmax,
151operator<<(std::ostream& o,
const ItemPrinter& ip)
Declarations of Arcane's general types.
void print(std::ostream &o) const
Write to stream of the current Item and its sub-items.
Internal structure of a mesh entity.
void print(std::ostream &o) const
Write to stream of the current Item.
View on a vector of entities.
Base class for a mesh element.
impl::ItemBase itemBase() const
Internal part of the entity.
void print(std::ostream &o) const
Write to stream of the current Item and its sub-items.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
eItemKind
Mesh entity type.
@ IK_Particle
Particle mesh entity.
@ IK_Node
Node mesh entity.
@ IK_Cell
Cell mesh entity.
@ IK_Unknown
Unknown or uninitialized mesh entity.
@ IK_Face
Face mesh entity.
@ IK_Edge
Edge mesh entity.