Debian Codegraph @

packages/seacas/libraries/ioss/src/Ioss_NullEntity.h

raw
1 // Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions
2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 // NTESS, the U.S. Government retains certain rights in this software.
4 //
5 // See packages/seacas/LICENSE for details
6
7 #pragma once
8
9 #include "Ioss_CodeTypes.h"
10 #include "Ioss_GroupingEntity.h"
11 #include <stddef.h>
12 #include <stdint.h>
13 #include <string>
14
15 #include "Ioss_EntityType.h"
16 #include "Ioss_Property.h"
17 #include "ioss_export.h"
18
19 namespace Ioss {
20 class DatabaseIO;
21 class Field;
22
23 class IOSS_EXPORT NullEntity : public GroupingEntity
24 {
25 public:
26 NullEntity();
27
28 IOSS_NODISCARD std::string type_string() const override { return "NullEntity"; }
29 IOSS_NODISCARD std::string short_type_string() const override { return "null"; }
30 IOSS_NODISCARD std::string contains_string() const override { return "Nothing"; }
31 IOSS_NODISCARD EntityType type() const override { return INVALID_TYPE; }
32
33 // Handle implicit properties -- These are calculated from data stored
34 // in the grouping entity instead of having an explicit value assigned.
35 // An example would be 'element_block_count' for a region.
36 IOSS_NODISCARD Property get_implicit_property(const std::string &my_name) const override
37 {
38 return Ioss::GroupingEntity::get_implicit_property(my_name);
39 }
40
41 protected:
42 int64_t internal_get_field_data(const Field &, void *, size_t) const override { return 0; }
43
44 int64_t internal_put_field_data(const Field &, void *, size_t) const override { return 0; }
45
46 int64_t internal_get_zc_field_data(const Field &, void **, size_t *) const override
47 {
48 return 0;
49 }
50 };
51 } // namespace Ioss