Skip to main content

Post-processing tools 2023 R2

dvs_var_interface.h

Last update: 17.04.2023
Go to the documentation of this file.
1 /**************************************************************
2 *
3 * (C) 2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
4 *
5 * Restricted Rights Legend
6 *
7 * Use, duplication, or disclosure of this
8 * software and its documentation by the
9 * Government is subject to restrictions as
10 * set forth in subdivision [(b)(3)(ii)] of
11 * the Rights in Technical Data and Computer
12 * Software clause at 52.227-7013.
13 *
14 **************************************************************
15 */
16 
24 #ifndef ___DVS_VAR_INTERFACE_H___
25 #define ___DVS_VAR_INTERFACE_H___
26 
29 
30 namespace DVS
31 {
32 
33 class IDataset;
34 
44 class IVar
45 {
46 public:
47 
48  IVar() = default;
49  virtual ~IVar() = default;
50  IVar(IVar&&) = default;
51  IVar& operator=(IVar&&) = default;
52  IVar(const IVar&) = default;
53  IVar& operator=(const IVar&) = default;
54 
60  virtual const char* get_name() const = 0;
61 
67  virtual dvs_var_type get_var_type() const = 0;
68 
74  virtual dvs_var_location get_var_location() const = 0;
75 
84  virtual uint32_t get_float_count_per_value() const = 0;
85 
91  virtual const char* get_unit_dimension() const = 0;
92 
100  virtual const char* get_unit_label() const = 0;
101 
107  virtual const DVS::IDataset* get_dataset() const = 0;
108 
114  virtual uint32_t get_num_metadata() const = 0;
115 
122  virtual const char* get_metadata_key(uint32_t index) const = 0;
123 
130  virtual const char* get_metadata_value(uint32_t index) const = 0;
131 
138  virtual const char* get_metadata_value(const char* key) const = 0;
139 };
140 
141 } //namespace DVS
142 
143 #endif //___DVS_VAR_INTERFACE_H___
Interface for datasets for the DVS Reader API.
Interface for variables for the DVS Reader API.
virtual ~IVar()=default
default
IVar()=default
default
virtual const char * get_metadata_value(const char *key) const =0
Get the metadata value based on the key.
virtual const char * get_metadata_key(uint32_t index) const =0
Get a metadata key based on the index.
virtual uint32_t get_num_metadata() const =0
Get the num metadata values on this var.
virtual const DVS::IDataset * get_dataset() const =0
Get the reference dataset for this var.
virtual const char * get_unit_label() const =0
Get the unit label as string.
IVar & operator=(const IVar &)=default
default
virtual dvs_var_location get_var_location() const =0
Get the var location.
virtual const char * get_metadata_value(uint32_t index) const =0
Get the metadata value base on the index.
virtual uint32_t get_float_count_per_value() const =0
Get the number of floats per value.
IVar(IVar &&)=default
default
virtual const char * get_unit_dimension() const =0
Get the unit dimensions as string.
IVar & operator=(IVar &&)=default
default
virtual dvs_var_type get_var_type() const =0
Get the type of var.
virtual const char * get_name() const =0
Get the name of the variable.
IVar(const IVar &)=default
support copying
Contains enums used in C/C++ API.
dvs_var_location
What variable is associated with.
dvs_var_type
Data type of variable.
Contains errors used in the DVS C/C++ API.