49class ItemSharedInfoWithType
51 friend class ItemSharedInfoList;
52 static const Int32 NULL_INDEX = ItemSharedInfo::NULL_INDEX;
56 ItemSharedInfoWithType()
68 ItemTypeId itemTypeId() {
return this->m_type_id; }
69 Int32 index()
const {
return m_index; }
70 void setIndex(
Int32 aindex) { m_index = aindex; }
71 Int32 nbReference()
const {
return m_nb_reference; }
72 void addReference() { ++m_nb_reference; }
73 void removeReference() { --m_nb_reference; }
75 static Integer serializeSize() {
return 6; }
79 friend std::ostream& operator<<(std::ostream& o,
const ItemSharedInfoWithType& isi)
81 isi.m_shared_info->print(o);
89 Int32 m_index = NULL_INDEX;
90 Int32 m_nb_reference = 0;
101class ItemSharedInfoList
108 typedef std::map<ItemNumElements, ItemSharedInfoWithType*> ItemSharedInfoMap;
125 bool need_alloc =
false;
138 m_list_changed =
true;
139 m_free_item_shared_infos.add(item);
150 void prepareForDump();
153 void dumpSharedInfos();
160 ARCANE_DEPRECATED_REASON(
"Y2022: This method always return 0")
161 Integer maxNodePerItem()
const {
return 0; }
162 ARCANE_DEPRECATED_REASON(
"Y2022: This method always return 0")
163 Integer maxEdgePerItem()
const {
return 0; }
164 ARCANE_DEPRECATED_REASON(
"Y2022: This method always return 0")
165 Integer maxFacePerItem()
const {
return 0; }
166 ARCANE_DEPRECATED_REASON(
"Y2022: This method always return 0")
167 Integer maxCellPerItem()
const {
return 0; }
168 ARCANE_DEPRECATED_REASON(
"Y2022: This method always return 0")
169 Integer maxLocalNodePerItemType()
const {
return 0; }
170 ARCANE_DEPRECATED_REASON(
"Y2022: This method always return 0")
171 Integer maxLocalEdgePerItemType()
const {
return 0; }
172 ARCANE_DEPRECATED_REASON(
"Y2022: This method always return 0")
173 Integer maxLocalFacePerItemType()
const {
return 0; }
177 ItemSharedInfoWithType* findSharedInfo(ItemTypeInfo* type);
181 ItemSharedInfoWithType* _allocOne(
bool& need_alloc)
183 ItemSharedInfoWithType* new_item = 0;
184 Integer nb_free = m_free_item_shared_infos.size();
185 m_list_changed =
true;
187 new_item = m_free_item_shared_infos.back();
188 m_free_item_shared_infos.popBack();
192 new_item = m_item_shared_infos_buffer->allocOne();
193 new_item->setIndex(m_item_shared_infos.size());
194 m_item_shared_infos.add(new_item);
203 ItemFamily* m_family =
nullptr;
204 ItemSharedInfo* m_common_item_shared_info =
nullptr;
210 ItemSharedInfoMap* m_infos_map =
nullptr;
212 bool m_list_changed =
false;