|
TECA
The Toolkit for Extreme Climate Analysis
|
A dataset used to read NetCDF CF2 time and metadata in parallel. More...
#include <teca_cf_time_axis_data.h>
Public Types | |
| using | elem_t = std::pair< p_teca_variant_array, teca_metadata > |
Public Types inherited from teca_dataset | |
| using | allocator = teca_variant_array::allocator |
Public Member Functions | |
| std::shared_ptr< teca_cf_time_axis_data > | shared_from_this () |
| std::shared_ptr< teca_cf_time_axis_data const > | shared_from_this () const |
| virtual p_teca_dataset | new_instance () const override |
| virtual p_teca_dataset | new_copy (allocator alloc=allocator::malloc) const override |
| virtual p_teca_dataset | new_shallow_copy () override |
| void | transfer (unsigned long file_id, elem_t &&data) |
| elem_t & | get (unsigned long file_id) |
| access the file's element More... | |
| const elem_t & | get (unsigned long file_id) const |
| void | append (const const_p_teca_dataset &other) |
| append the data from the other instance More... | |
| void | shallow_append (const const_p_teca_dataset &other) |
| std::string | get_class_name () const override |
| return a unique string identifier More... | |
| int | get_type_code () const override |
| return an integer identifier uniquely naming the dataset type More... | |
| operator bool () const noexcept | |
| covert to boolean. More... | |
| bool | empty () const noexcept override |
| return true if the dataset is empty. More... | |
| int | to_stream (teca_binary_stream &) const override |
| serialize the dataset to/from the given stream for I/O or communication More... | |
| int | from_stream (teca_binary_stream &) override |
| int | to_stream (std::ostream &) const override |
| stream to/from human readable representation More... | |
| int | from_stream (std::istream &) override |
| void | copy (const const_p_teca_dataset &other, allocator alloc=allocator::malloc) override |
| void | shallow_copy (const p_teca_dataset &other) override |
| void | swap (const p_teca_dataset &other) override |
| swap internals of the two objects More... | |
| teca_cf_time_axis_data () | |
| virtual teca_metadata & | get_metadata () noexcept |
| virtual const teca_metadata & | get_metadata () const noexcept |
Public Member Functions inherited from teca_dataset | |
| 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 |
| virtual int | get_request_index (long &val) const |
| virtual int | set_request_index (const std::string &key, long val) |
| virtual int | set_request_index (long val) |
| operator bool () const noexcept | |
| virtual void | copy_metadata (const const_p_teca_dataset &other) |
| virtual teca_metadata & | get_metadata () noexcept |
| virtual const teca_metadata & | get_metadata () const noexcept |
| virtual void | set_metadata (const teca_metadata &md) |
Static Public Member Functions | |
| static p_teca_cf_time_axis_data | New () |
| static teca_metadata & | get_metadata (elem_t &elem) |
| given an element extract metadata More... | |
| static const teca_metadata & | get_metadata (const elem_t &elem) |
| given an element extract metadata More... | |
| static p_teca_variant_array | get_variant_array (elem_t &elem) |
| given an element extract the time axis More... | |
| static const_p_teca_variant_array | get_variant_array (const elem_t &elem) |
| given an element extract the time axis More... | |
Protected Member Functions | |
| teca_cf_time_axis_data (const teca_cf_time_axis_data &other)=delete | |
| teca_cf_time_axis_data (teca_cf_time_axis_data &&other)=delete | |
| teca_cf_time_axis_data & | operator= (const teca_cf_time_axis_data &other)=delete |
Protected Member Functions inherited from teca_dataset | |
| 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 |
Additional Inherited Members | |
Protected Attributes inherited from teca_dataset | |
| teca_metadata * | metadata |
A dataset used to read NetCDF CF2 time and metadata in parallel.
The dataset contains elements (one per file) of type: std::pair<p_teca_variant_array, teca_metadata> holding the time axis and associated NetCDF attributes.
| teca_cf_time_axis_data::teca_cf_time_axis_data | ( | ) |
| void teca_cf_time_axis_data::append | ( | const const_p_teca_dataset & | other | ) |
append the data from the other instance
|
overridevirtual |
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 from teca_dataset.
|
overridevirtualnoexcept |
return true if the dataset is empty.
Reimplemented from teca_dataset.
| elem_t& teca_cf_time_axis_data::get | ( | unsigned long | file_id | ) |
access the file's element
|
inlineoverridevirtual |
return a unique string identifier
Implements teca_dataset.
|
inlinestatic |
given an element extract metadata
|
inlinestatic |
given an element extract metadata
|
overridevirtual |
return an integer identifier uniquely naming the dataset type
Implements teca_dataset.
|
inlinestatic |
given an element extract the time axis
|
inlinestatic |
given an element extract the time axis
|
inlineoverridevirtual |
Implements teca_dataset.
|
inlineoverridevirtual |
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.
Implements teca_dataset.
|
inlineexplicitnoexcept |
covert to boolean.
|
overridevirtual |
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 from teca_dataset.
|
overridevirtual |
swap internals of the two objects
Reimplemented from teca_dataset.
|
overridevirtual |
stream to/from human readable representation
Reimplemented from teca_dataset.
|
overridevirtual |
serialize the dataset to/from the given stream for I/O or communication
Reimplemented from teca_dataset.
| void teca_cf_time_axis_data::transfer | ( | unsigned long | file_id, |
| elem_t && | data | ||
| ) |
transfer the element associated with file to the dataset. after transfer the passed element is invalid in the calling context