| 1 |
// Copyright(C) 1999-2020, 2023 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 <cstddef> |
| 12 |
|
| 13 |
namespace Ioss { |
| 14 |
class Field; |
| 15 |
} // namespace Ioss |
| 16 |
|
| 17 |
/** \brief Create a blob with no members initially. |
| 18 |
* |
| 19 |
* \param[in] io_database The database associated with the region containing the blob. |
| 20 |
* \param[in] my_name The blob's name. |
| 21 |
* \param[in] item_count The number of items stored in this blob |
| 22 |
*/ |
| 23 |
Ioss::Blob::Blob(Ioss::DatabaseIO *io_database, const std::string &my_name, int64_t item_count) |
| 24 |
: Ioss::GroupingEntity(io_database, my_name, item_count) |
| 25 |
{ |
| 26 |
} |
| 27 |
|
| 28 |
int64_t Ioss::Blob::internal_get_field_data(const Ioss::Field &field, void *data, |
| 29 |
size_t data_size) const |
| 30 |
{ |
| 31 |
return get_database()->get_field(this, field, data, data_size); |
| 32 |
} |
| 33 |
|
| 34 |
int64_t Ioss::Blob::internal_put_field_data(const Ioss::Field &field, void *data, |
| 35 |
size_t data_size) const |
| 36 |
{ |
| 37 |
return get_database()->put_field(this, field, data, data_size); |
| 38 |
} |
| 39 |
|
| 40 |
int64_t Ioss::Blob::internal_get_zc_field_data(const Field &field, void **data, |
| 41 |
size_t *data_size) const |
| 42 |
{ |
| 43 |
return get_database()->get_zc_field(this, field, data, data_size); |
| 44 |
} |
| 45 |
|
| 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 |
} |