4 #include "teca_variant_array.h"
5 #include "teca_dataset_fwd.h"
13 class teca_dataset :
public std::enable_shared_from_this<teca_dataset>
20 TECA_DATASET_METADATA(index_request_key, std::string, 1)
25 virtual int get_request_index(
long &val)
const;
26 virtual int set_request_index(
const std::string &key,
long val);
27 virtual int set_request_index(
long val);
31 explicit operator bool()
const noexcept
32 {
return !this->empty(); }
35 virtual bool empty()
const noexcept
39 virtual p_teca_dataset new_instance()
const = 0;
43 virtual p_teca_dataset new_copy()
const = 0;
44 virtual p_teca_dataset new_shallow_copy() = 0;
47 virtual std::string get_class_name()
const = 0;
50 virtual int get_type_code()
const = 0;
54 virtual void copy(
const const_p_teca_dataset &other);
55 virtual void shallow_copy(
const p_teca_dataset &other);
58 virtual void copy_metadata(
const const_p_teca_dataset &other);
61 virtual void swap(p_teca_dataset &other);
74 virtual int to_stream(std::ostream &)
const;
75 virtual int from_stream(std::istream &);
83 void operator=(
const p_teca_dataset &other) =
delete;
84 void operator=(p_teca_dataset &&other) =
delete;