|
TECA
The Toolkit for Extreme Climate Analysis
|
Interface for TECA datasets. More...
#include <teca_dataset.h>
Public Types | |
| using | allocator = teca_variant_array::allocator |
Public Member Functions | |
| virtual int | set_request_indices (const std::string &request_key, const unsigned long ids[2]) |
| virtual int | get_request_indices (unsigned long ids[2]) const |
| virtual int | get_request_index (unsigned long &index) const |
| virtual int | set_request_index (const std::string &request_key, unsigned long index) |
| operator bool () const noexcept | |
| virtual bool | empty () const noexcept |
| virtual p_teca_dataset | new_instance () const =0 |
| virtual constructor. return a new dataset of the same type. More... | |
| virtual p_teca_dataset | new_copy (allocator alloc=allocator::malloc) const =0 |
| virtual p_teca_dataset | new_shallow_copy ()=0 |
| virtual std::string | get_class_name () const =0 |
| virtual int | get_type_code () const =0 |
| virtual void | copy (const const_p_teca_dataset &other, allocator alloc=allocator::malloc) |
| virtual void | shallow_copy (const p_teca_dataset &other) |
| virtual void | copy_metadata (const const_p_teca_dataset &other) |
| copy metadata. always a deep copy. More... | |
| virtual void | swap (const p_teca_dataset &other) |
| swap internals of the two objects More... | |
| virtual teca_metadata & | get_metadata () noexcept |
| get the dataset metadata More... | |
| virtual const teca_metadata & | get_metadata () const noexcept |
| get the dataset metadata More... | |
| virtual void | set_metadata (const teca_metadata &md) |
| set the dataset metadata More... | |
| virtual int | to_stream (teca_binary_stream &) const |
| serialize the dataset to the given stream for I/O or communication More... | |
| virtual int | from_stream (teca_binary_stream &) |
| deserialize the dataset from the given stream for I/O or communication More... | |
| virtual int | to_stream (std::ostream &) const |
| send to stream in a human readable representation More... | |
| virtual int | from_stream (std::istream &) |
| read from stream in a human readable representation More... | |
index_request_key | |
The name of the key that holds the index identifying this dataset's location in the index set. | |
| void | set_index_request_key (const std::vector< std::string > &vals) |
| int | get_index_request_key (std::vector< std::string > &vals) const |
| void | set_index_request_key (const p_teca_variant_array &vals) |
| int | get_index_request_key (p_teca_variant_array vals) const |
| void | set_index_request_key (const std::initializer_list< std::string > &l) |
| void | set_index_request_key (const std::string *vals) |
| int | get_index_request_key (std::string *vals) const |
| void | set_index_request_key (const std::string &val_1) |
| int | get_index_request_key (std::string &val_1) const |
Protected Member Functions | |
| teca_dataset (const teca_dataset &)=delete | |
| teca_dataset (const teca_dataset &&)=delete | |
| void | operator= (const p_teca_dataset &other)=delete |
| void | operator= (p_teca_dataset &&other)=delete |
Protected Attributes | |
| teca_metadata * | metadata |
Interface for TECA datasets.
|
virtual |
Deep copy data and metdata.
| [in] | other | The dataset to copy. |
| [in] | alloc | The allocator to use for alloctions of data structures to hold the copy. The default is a CPU based allocator. |
Reimplemented in teca_cf_time_axis_data, teca_uniform_cartesian_mesh, teca_table, teca_mesh, teca_curvilinear_mesh, teca_cartesian_mesh, teca_array_collection, teca_arakawa_c_grid, and teca_database.
|
virtual |
copy metadata. always a deep copy.
Reimplemented in teca_database, teca_curvilinear_mesh, teca_cartesian_mesh, and teca_arakawa_c_grid.
|
inlinevirtualnoexcept |
Reimplemented in teca_cf_time_axis_data, teca_table, teca_mesh, teca_database, and teca_arakawa_c_grid.
|
virtual |
read from stream in a human readable representation
Reimplemented in teca_cf_time_axis_data, teca_table, teca_mesh, and teca_database.
|
virtual |
deserialize the dataset from the given stream for I/O or communication
Reimplemented in teca_array_collection, teca_cf_time_axis_data, teca_table, teca_mesh, teca_database, teca_curvilinear_mesh, teca_cartesian_mesh, and teca_arakawa_c_grid.
|
virtualnoexcept |
get the dataset metadata
|
virtualnoexcept |
get the dataset metadata
Reimplemented in teca_cf_time_axis_data, and teca_cf_time_axis_data.
|
virtual |
Looks for an index_request_key and uses the value to get the single index stored in this dataset. The call can fail if the index_request_key has not been set or if the dataset holds more than one index.
| [out] | ids | the inclusive range of indices stored in this dataset. |
|
virtual |
Looks for an index_request_key and uses the value to get the inclusive range of indices stored in this dataset. The call can fail if the index_request_key has not been set.
| [out] | ids | the inclusive range of indices stored in this dataset. |
|
pure virtual |
Virtual copy constructor. return a deep copy of this dataset in a new instance.
| [in] | alloc | The allocator to use for alloctions of data structures to hold the copy. The default is a CPU based allocator. |
Implemented in teca_cf_time_axis_data, teca_uniform_cartesian_mesh, teca_table, teca_database, teca_curvilinear_mesh, teca_cartesian_mesh, teca_array_collection, and teca_arakawa_c_grid.
|
pure virtual |
virtual constructor. return a new dataset of the same type.
Implemented in teca_cf_time_axis_data, teca_uniform_cartesian_mesh, teca_table, teca_database, teca_curvilinear_mesh, teca_cartesian_mesh, teca_array_collection, and teca_arakawa_c_grid.
|
pure virtual |
Virtual shallow copy constructor. return a shallow copy of this dataset in a new instance. References to source data structures are taken, but metadata is always deep copied.
Implemented in teca_cf_time_axis_data, teca_uniform_cartesian_mesh, teca_table, teca_database, teca_curvilinear_mesh, teca_cartesian_mesh, teca_array_collection, and teca_arakawa_c_grid.
|
inlineexplicitnoexcept |
covert to boolean.
|
virtual |
set the dataset metadata
|
virtual |
Set the name of the index_request_key and a key with that name set to an inclusive range of indices [i0, i0] i.e. a single index.
| [in] | request_key | the name of the index_request_key will be stored in the dataset metadata index_request_key |
| [in] | ids | an inclusive range of indices that will be stored in a key named by the value of request_key |
|
virtual |
Set the name of the index_request_key and a key with that name set to an inclusive range of indices [i0, i1].
| [in] | request_key | the name of the index_request_key will be stored in the dataset metadata index_request_key |
| [in] | ids | an inclusive range of indices that will be stored in a key named by the value of request_key |
|
virtual |
Shallow copy data and metadata. The shallow copy takes references to the source data structures. Metadata is always deep copied.
| [in] | other | The dataset to copy. |
Reimplemented in teca_cf_time_axis_data, teca_uniform_cartesian_mesh, teca_table, teca_mesh, teca_database, teca_curvilinear_mesh, teca_cartesian_mesh, teca_array_collection, and teca_arakawa_c_grid.
|
virtual |
swap internals of the two objects
Reimplemented in teca_cf_time_axis_data, teca_table, teca_database, teca_array_collection, teca_uniform_cartesian_mesh, teca_mesh, teca_curvilinear_mesh, teca_cartesian_mesh, and teca_arakawa_c_grid.
|
virtual |
send to stream in a human readable representation
Reimplemented in teca_cf_time_axis_data, teca_table, teca_mesh, teca_database, teca_curvilinear_mesh, teca_cartesian_mesh, teca_array_collection, and teca_arakawa_c_grid.
|
virtual |
serialize the dataset to the given stream for I/O or communication
Reimplemented in teca_array_collection, teca_cf_time_axis_data, teca_table, teca_mesh, teca_database, teca_curvilinear_mesh, teca_cartesian_mesh, and teca_arakawa_c_grid.