IOSS 2.0
Loading...
Searching...
No Matches
Ioss_NullEntity.h
Go to the documentation of this file.
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
19namespace 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 {
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
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:54
Holds metadata for bulk data associated with a GroupingEntity.
Definition Ioss_Field.h:25
Base class for all 'grouping' entities. The following derived classes are typical:
Definition Ioss_GroupingEntity.h:67
virtual IOSS_NODISCARD Property get_implicit_property(const std::string &my_name) const =0
Calculate and get an implicit property.
Definition Ioss_GroupingEntity.C:156
Definition Ioss_NullEntity.h:24
int64_t internal_get_zc_field_data(const Field &, void **, size_t *) const override
Definition Ioss_NullEntity.h:46
IOSS_NODISCARD std::string type_string() const override
Get the name of the particular type of entity.
Definition Ioss_NullEntity.h:28
int64_t internal_get_field_data(const Field &, void *, size_t) const override
Definition Ioss_NullEntity.h:42
IOSS_NODISCARD std::string short_type_string() const override
Get a short name of the particular type of entity.
Definition Ioss_NullEntity.h:29
IOSS_NODISCARD std::string contains_string() const override
What does this entity contain.
Definition Ioss_NullEntity.h:30
IOSS_NODISCARD EntityType type() const override
Get the EntityType, which indicates the particular type of GroupingEntity this is.
Definition Ioss_NullEntity.h:31
int64_t internal_put_field_data(const Field &, void *, size_t) const override
Definition Ioss_NullEntity.h:44
IOSS_NODISCARD Property get_implicit_property(const std::string &my_name) const override
Calculate and get an implicit property.
Definition Ioss_NullEntity.h:36
A named value that has a known type.
Definition Ioss_Property.h:27
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
EntityType
The particular type of GroupingEntity.
Definition Ioss_EntityType.h:12
@ INVALID_TYPE
Definition Ioss_EntityType.h:30