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 #include <Ioss_Blob.h>
8 #include <Ioss_DatabaseIO.h>
9 #include <Ioss_GroupingEntity.h>
10 #include <Ioss_Property.h>
11 #include <Ioss_PropertyManager.h>
12 #include <Ioss_Region.h>
13 #include <algorithm>
14 #include <cstddef>
15 #include <fmt/ostream.h>
16 #include <string>
17 #include <vector>
18 
19 namespace Ioss {
20   class Field;
21 } // namespace Ioss
22 
23 /** \brief Create a blob with no members initially.
24  *
25  *  \param[in] io_database The database associated with the region containing the blob.
26  *  \param[in] my_name The blob's name.
27  *  \param[in] item_count The number of items stored in this blob
28  */
Blob(Ioss::DatabaseIO * io_database,const std::string & my_name,int64_t item_count)29 Ioss::Blob::Blob(Ioss::DatabaseIO *io_database, const std::string &my_name, int64_t item_count)
30     : Ioss::GroupingEntity(io_database, my_name, item_count)
31 {
32 }
33 
internal_get_field_data(const Ioss::Field & field,void * data,size_t data_size)34 int64_t Ioss::Blob::internal_get_field_data(const Ioss::Field &field, void *data,
35                                             size_t data_size) const
36 {
37   return get_database()->get_field(this, field, data, data_size);
38 }
39 
internal_put_field_data(const Ioss::Field & field,void * data,size_t data_size)40 int64_t Ioss::Blob::internal_put_field_data(const Ioss::Field &field, void *data,
41                                             size_t data_size) const
42 {
43   return get_database()->put_field(this, field, data, data_size);
44 }
45 
get_implicit_property(const std::string & my_name)46 Ioss::Property Ioss::Blob::get_implicit_property(const std::string &my_name) const
47 {
48   return Ioss::GroupingEntity::get_implicit_property(my_name);
49 }
50