IOSS  2.0
Ioss_NullEntity.h
Go to the documentation of this file.
1 // Copyright(C) 1999-2020 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 #ifndef IOSS_Ioss_NullEntity_h
8 #define IOSS_Ioss_NullEntity_h
9 
10 #include <Ioss_CodeTypes.h>
11 #include <Ioss_GroupingEntity.h>
12 #include <string>
13 
14 namespace Ioss {
15  class DatabaseIO;
16 
17  class NullEntity : public GroupingEntity
18  {
19  public:
20  NullEntity() : Ioss::GroupingEntity(nullptr, "null_entity", 0) {}
21 
22  std::string type_string() const override { return "NullEntity"; }
23  std::string short_type_string() const override { return "null"; }
24  std::string contains_string() const override { return "Nothing"; }
25  EntityType type() const override { return INVALID_TYPE; }
26 
27  // Handle implicit properties -- These are calcuated from data stored
28  // in the grouping entity instead of having an explicit value assigned.
29  // An example would be 'element_block_count' for a region.
30  Property get_implicit_property(const std::string &my_name) const override
31  {
33  }
34 
35  protected:
36  int64_t internal_get_field_data(const Field &, void *, size_t) const override { return 0; }
37 
38  int64_t internal_put_field_data(const Field &, void *, size_t) const override { return 0; }
39  };
40 } // namespace Ioss
41 #endif
Ioss::Field
Holds metadata for bulk data associated with a GroupingEntity.
Definition: Ioss_Field.h:22
Ioss::NullEntity::get_implicit_property
Property get_implicit_property(const std::string &my_name) const override
Calculate and get an implicit property.
Definition: Ioss_NullEntity.h:30
Ioss
The main namespace for the Ioss library.
Definition: Ioad_DatabaseIO.C:40
Ioss::NullEntity::type_string
std::string type_string() const override
Get the name of the particular type of entity.
Definition: Ioss_NullEntity.h:22
Ioss::INVALID_TYPE
@ INVALID_TYPE
Definition: Ioss_EntityType.h:31
Ioss::GroupingEntity::get_implicit_property
virtual Property get_implicit_property(const std::string &my_name) const =0
Calculate and get an implicit property.
Definition: Ioss_GroupingEntity.C:159
Ioss::EntityType
EntityType
The particular type of GroupingEntity.
Definition: Ioss_EntityType.h:13
Ioss::NullEntity::internal_put_field_data
int64_t internal_put_field_data(const Field &, void *, size_t) const override
Definition: Ioss_NullEntity.h:38
Ioss::NullEntity::NullEntity
NullEntity()
Definition: Ioss_NullEntity.h:20
Ioss::NullEntity::type
EntityType type() const override
Get the EntityType, which indicates the particular type of GroupingEntity this is.
Definition: Ioss_NullEntity.h:25
Ioss::NullEntity::short_type_string
std::string short_type_string() const override
Get a short name of the particular type of entity.
Definition: Ioss_NullEntity.h:23
Ioss_GroupingEntity.h
Ioss::NullEntity::internal_get_field_data
int64_t internal_get_field_data(const Field &, void *, size_t) const override
Definition: Ioss_NullEntity.h:36
Ioss::NullEntity
Definition: Ioss_NullEntity.h:18
Ioss::NullEntity::contains_string
std::string contains_string() const override
What does this entity contain.
Definition: Ioss_NullEntity.h:24
Ioss::Property
A named value that has a known type.
Definition: Ioss_Property.h:24
Ioss::GroupingEntity
Base class for all 'grouping' entities. The following derived classes are typical:
Definition: Ioss_GroupingEntity.h:68
Ioss_CodeTypes.h