TECA
The Toolkit for Extreme Climate Analysis
teca_dataset Class Referenceabstract

Interface for TECA datasets. More...

#include <teca_dataset.h>

Inheritance diagram for teca_dataset:
Collaboration diagram for teca_dataset:

Public Types

using allocator = teca_variant_array::allocator
 

Public Member Functions

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 bool empty () const noexcept
 
virtual p_teca_dataset new_instance () const =0
 
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)
 
virtual void swap (const p_teca_dataset &other)
 
virtual teca_metadataget_metadata () noexcept
 
virtual const teca_metadataget_metadata () const noexcept
 
virtual void set_metadata (const teca_metadata &md)
 
virtual int to_stream (teca_binary_stream &) const
 
virtual int from_stream (teca_binary_stream &)
 
virtual int to_stream (std::ostream &) const
 
virtual int from_stream (std::istream &)
 

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_metadatametadata
 

Detailed Description

Interface for TECA datasets.

Member Function Documentation

◆ copy()

virtual void teca_dataset::copy ( const const_p_teca_dataset &  other,
allocator  alloc = allocator::malloc 
)
virtual

Deep copy data and metdata.

Parameters
[in]otherThe dataset to copy.
[in]allocThe allocator to use for alloctions of data structures to hold the copy. The default is a CPU based allocator.

Reimplemented in teca_arakawa_c_grid, teca_array_collection, teca_table, teca_mesh, teca_cartesian_mesh, teca_cf_time_axis_data, teca_curvilinear_mesh, teca_uniform_cartesian_mesh, and teca_database.

◆ new_copy()

virtual p_teca_dataset teca_dataset::new_copy ( allocator  alloc = allocator::malloc) const
pure virtual

Virtual copy constructor. return a deep copy of this dataset in a new instance.

Parameters
[in]allocThe allocator to use for alloctions of data structures to hold the copy. The default is a CPU based allocator.

Implemented in teca_arakawa_c_grid, teca_cf_time_axis_data, teca_array_collection, teca_database, teca_table, teca_cartesian_mesh, teca_curvilinear_mesh, and teca_uniform_cartesian_mesh.

◆ new_shallow_copy()

virtual p_teca_dataset teca_dataset::new_shallow_copy ( )
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_arakawa_c_grid, teca_cf_time_axis_data, teca_array_collection, teca_database, teca_table, teca_cartesian_mesh, teca_curvilinear_mesh, and teca_uniform_cartesian_mesh.

◆ shallow_copy()

virtual void teca_dataset::shallow_copy ( const p_teca_dataset &  other)
virtual

Shallow copy data and metadata. The shallow copy takes references to the source data structures. Metadata is always deep copied.

Parameters
[in]otherThe dataset to copy.

Reimplemented in teca_arakawa_c_grid, teca_table, teca_array_collection, teca_mesh, teca_cartesian_mesh, teca_database, teca_cf_time_axis_data, teca_curvilinear_mesh, and teca_uniform_cartesian_mesh.


The documentation for this class was generated from the following file: