Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ItemTypeId.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* ItemTypeId.h (C) 2000-2022 */
9/* */
10/* Type d'une entité. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_ITEMTYPEID_H
13#define ARCANE_ITEMTYPEID_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/ItemTypes.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
31class ARCANE_CORE_EXPORT ItemTypeId
32{
33 public:
34
35 ItemTypeId() = default;
36 constexpr ARCCORE_HOST_DEVICE explicit ItemTypeId(Int16 id)
37 : m_type_id(id)
38 {}
39 constexpr ARCCORE_HOST_DEVICE operator Int16() const { return m_type_id; }
40
41 public:
42
43 constexpr ARCCORE_HOST_DEVICE Int16 typeId() const { return m_type_id; }
44 constexpr ARCCORE_HOST_DEVICE bool isNull() const { return m_type_id == IT_NullType; }
51 static ItemTypeId fromInteger(Int64 v);
52
53 private:
54
55 Int16 m_type_id = IT_NullType;
56};
57
58/*---------------------------------------------------------------------------*/
59/*---------------------------------------------------------------------------*/
60
61} // End namespace Arcane
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
65
66#endif
Type d'une entité (Item).
Definition ItemTypeId.h:32
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-