Skip to main content

Post-processing tools 2025 R1

dvs_var_interface

Last update: 16.07.2025
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
30namespace DVS
31{
32
33class IDataset;
41enum class VAR_TYPE {
42 FLOAT,
43 /* New types add here before INT64 */
44 INT64 // Keep INT64 at the end
45};
46
47
57class IVar
58{
59public:
60
61 IVar() = default;
62 virtual ~IVar() = default;
63 IVar(IVar&&) = default;
64 IVar& operator=(IVar&&) = default;
65 IVar(const IVar&) = default;
66 IVar& operator=(const IVar&) = default;
67
73 virtual const char* get_name() const = 0;
74
80 virtual dvs_var_type get_var_type() const = 0;
81
88
97 virtual uint32_t get_float_count_per_value() const = 0;
98
104 virtual const char* get_unit_dimension() const = 0;
105
113 virtual const char* get_unit_label() const = 0;
114
120 virtual const DVS::IDataset* get_dataset() const = 0;
121
127 virtual uint32_t get_num_metadata() const = 0;
128
135 virtual const char* get_metadata_key(uint32_t index) const = 0;
136
143 virtual const char* get_metadata_value(uint32_t index) const = 0;
144
151 virtual const char* get_metadata_value(const char* key) const = 0;
152};
153
154} //namespace DVS
155
156#endif //___DVS_VAR_INTERFACE_H___
Interface for datasets for the DVS Reader API.
Interface for variables for the DVS Reader API.
virtual const char * get_metadata_value(const char *key) const =0
Get the metadata value based on the key.
virtual ~IVar()=default
default
IVar()=default
default
virtual const char * get_name() const =0
Get the name of the variable.
virtual const char * get_metadata_value(uint32_t index) const =0
Get the metadata value base on the index.
virtual uint32_t get_num_metadata() const =0
Get the num metadata values on this var.
virtual const char * get_unit_dimension() const =0
Get the unit dimensions as string.
virtual dvs_var_location get_var_location() const =0
Get the var location.
virtual uint32_t get_float_count_per_value() const =0
Get the number of floats per value.
virtual const char * get_unit_label() const =0
Get the unit label as string.
IVar & operator=(const IVar &)=default
default
IVar(IVar &&)=default
default
virtual const DVS::IDataset * get_dataset() const =0
Get the reference dataset for this var.
IVar & operator=(IVar &&)=default
default
virtual const char * get_metadata_key(uint32_t index) const =0
Get a metadata key based on the index.
virtual dvs_var_type get_var_type() const =0
Get the type of var.
IVar(const IVar &)=default
support copying
VAR_TYPE
Variable type enum definition.
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.

Connect with Ansys