Debian Codegraph @

packages/seacas/libraries/ioss/src/Ioss_Blob.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_GroupingEntity.h"
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
19 namespace Ioss {
20 class DatabaseIO;
21 class Field;
22 } // namespace Ioss
23
24 namespace 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