IOSS 2.0
Loading...
Searching...
No Matches
Ioss_Blob.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
10#include <cstddef> // for size_t
11#include <cstdint> // for int64_t
12#include <string> // for string
13#include <vector>
14
15#include "Ioss_EntityType.h" // for EntityType, etc
16#include "Ioss_Property.h" // for Property
17#include "ioss_export.h"
18
19namespace Ioss {
20 class DatabaseIO;
21 class Field;
22} // namespace Ioss
23
24namespace Ioss {
25
26 using EntityContainer = std::vector<const Ioss::GroupingEntity *>;
27
28 /** \brief A homogeneous collection of other GroupingEntities.
29 */
30 class IOSS_EXPORT Blob : public GroupingEntity
31 {
32 public:
33 Blob() = default; // Used for template typing only
34 Blob(const Blob &other) = default;
35
36 Blob(DatabaseIO *io_database, const std::string &my_name, int64_t item_count);
37
38 IOSS_NODISCARD std::string type_string() const override { return "Blob"; }
39 IOSS_NODISCARD std::string short_type_string() const override { return "blob"; }
40 IOSS_NODISCARD std::string contains_string() const override { return "Entries"; }
41 IOSS_NODISCARD EntityType type() const override { return BLOB; }
42
43 // Handle implicit properties -- These are calculated from data stored
44 // in the grouping entity instead of having an explicit value assigned.
45 // An example would be 'element_block_count' for a region.
46 IOSS_NODISCARD Property get_implicit_property(const std::string &my_name) const override;
47
48 protected:
49 int64_t internal_get_field_data(const Field &field, void *data,
50 size_t data_size) const override;
51
52 int64_t internal_put_field_data(const Field &field, void *data,
53 size_t data_size) const override;
54
55 int64_t internal_get_zc_field_data(const Field &field, void **data,
56 size_t *data_size) const override;
57 };
58} // namespace Ioss
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:54
A homogeneous collection of other GroupingEntities.
Definition Ioss_Blob.h:31
Blob()=default
IOSS_NODISCARD std::string short_type_string() const override
Get a short name of the particular type of entity.
Definition Ioss_Blob.h:39
IOSS_NODISCARD std::string contains_string() const override
What does this entity contain.
Definition Ioss_Blob.h:40
IOSS_NODISCARD EntityType type() const override
Get the EntityType, which indicates the particular type of GroupingEntity this is.
Definition Ioss_Blob.h:41
Blob(const Blob &other)=default
IOSS_NODISCARD std::string type_string() const override
Get the name of the particular type of entity.
Definition Ioss_Blob.h:38
An input or output Database.
Definition Ioss_DatabaseIO.h:63
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
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
std::vector< const Ioss::GroupingEntity * > EntityContainer
Definition Ioss_Assembly.h:26
EntityType
The particular type of GroupingEntity.
Definition Ioss_EntityType.h:12
@ BLOB
Definition Ioss_EntityType.h:29