    

 ## On this page

  

 

 # dvs\_var\_interface

 Last update: 16.07.2025 

[Go to the documentation of this file.](dvs__var__interface_8h.xhtml)<a id="l00001" name="l00001"></a> 1/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00002" name="l00002"></a> 2\*

<a id="l00003" name="l00003"></a> 3\* (C) 2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

<a id="l00004" name="l00004"></a> 4\*

<a id="l00005" name="l00005"></a> 5\* Restricted Rights Legend

<a id="l00006" name="l00006"></a> 6\*

<a id="l00007" name="l00007"></a> 7\* Use, duplication, or disclosure of this

<a id="l00008" name="l00008"></a> 8\* software and its documentation by the

<a id="l00009" name="l00009"></a> 9\* Government is subject to restrictions as

<a id="l00010" name="l00010"></a> 10\* set forth in subdivision \[(b)(3)(ii)\] of

<a id="l00011" name="l00011"></a> 11\* the Rights in Technical Data and Computer

<a id="l00012" name="l00012"></a> 12\* Software clause at 52.227-7013.

<a id="l00013" name="l00013"></a> 13\*

<a id="l00014" name="l00014"></a> 14\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00015" name="l00015"></a> 15\*/

<a id="l00016" name="l00016"></a> 16 

<a id="l00024" name="l00024"></a> 24\#ifndef \_\_\_DVS\_VAR\_INTERFACE\_H\_\_\_

<a id="l00025" name="l00025"></a> 25\#define \_\_\_DVS\_VAR\_INTERFACE\_H\_\_\_

<a id="l00026" name="l00026"></a> 26 

<a id="l00027" name="l00027"></a> 27\#include "[dynamic\_visualization\_store\_enums.h](dynamic__visualization__store__enums_8h.xhtml)"

<a id="l00028" name="l00028"></a> 28\#include "[dynamic\_visualization\_store\_error\_codes.h](dynamic__visualization__store__error__codes_8h.xhtml)"

<a id="l00029" name="l00029"></a> 29 

<a id="l00030" name="l00030"></a> 30namespace DVS

<a id="l00031" name="l00031"></a> 31{

<a id="l00032" name="l00032"></a> 32 

<a id="l00033" name="l00033"></a> 33class IDataset;

<a id="l00041" name="l00041"></a>[ 41](dvs__var__interface_8h.xhtml#a84856d33cb231d1d87a603758b8b8066)enum class [VAR\_TYPE](dvs__var__interface_8h.xhtml#a84856d33cb231d1d87a603758b8b8066) {

<a id="l00042" name="l00042"></a> 42 FLOAT,

<a id="l00043" name="l00043"></a> 43 /\* New types add here before INT64 \*/

<a id="l00044" name="l00044"></a> 44 INT64 // Keep INT64 at the end

<a id="l00045" name="l00045"></a> 45};



<a id="l00046" name="l00046"></a> 46 

<a id="l00047" name="l00047"></a> 47 

<a id="l00057" name="l00057"></a>[ 57](class_d_v_s_1_1_i_var.xhtml)class [IVar](class_d_v_s_1_1_i_var.xhtml)

<a id="l00058" name="l00058"></a> 58{

<a id="l00059" name="l00059"></a> 59public:

<a id="l00060" name="l00060"></a> 60 

<a id="l00061" name="l00061"></a>[ 61](class_d_v_s_1_1_i_var.xhtml#a102df9a173523a896419011582abefb1) [IVar](class_d_v_s_1_1_i_var.xhtml#a102df9a173523a896419011582abefb1)() = default; 

<a id="l00062" name="l00062"></a>[ 62](class_d_v_s_1_1_i_var.xhtml#a0f21e53225c764cb3441f36c32f77bee) virtual [~IVar](class_d_v_s_1_1_i_var.xhtml#a0f21e53225c764cb3441f36c32f77bee)() = default; 

<a id="l00063" name="l00063"></a>[ 63](class_d_v_s_1_1_i_var.xhtml#aac24d89cca155832661aaf190e933e30) [IVar](class_d_v_s_1_1_i_var.xhtml#aac24d89cca155832661aaf190e933e30)([IVar](class_d_v_s_1_1_i_var.xhtml)&amp;&amp;) = default; 

<a id="l00064" name="l00064"></a>[ 64](class_d_v_s_1_1_i_var.xhtml#ad2bc5d54f4ba396d261698089d3ec263) [IVar](class_d_v_s_1_1_i_var.xhtml)&amp; [operator=](class_d_v_s_1_1_i_var.xhtml#ad2bc5d54f4ba396d261698089d3ec263)([IVar](class_d_v_s_1_1_i_var.xhtml)&amp;&amp;) = default; 

<a id="l00065" name="l00065"></a>[ 65](class_d_v_s_1_1_i_var.xhtml#afd5bd19f8cf769575e1d6f13890c876b) [IVar](class_d_v_s_1_1_i_var.xhtml#afd5bd19f8cf769575e1d6f13890c876b)(const [IVar](class_d_v_s_1_1_i_var.xhtml)&amp;) = default; 

<a id="l00066" name="l00066"></a>[ 66](class_d_v_s_1_1_i_var.xhtml#aa7eb6e25ea05a45c383d24ef7483486a) [IVar](class_d_v_s_1_1_i_var.xhtml)&amp; [operator=](class_d_v_s_1_1_i_var.xhtml#aa7eb6e25ea05a45c383d24ef7483486a)(const [IVar](class_d_v_s_1_1_i_var.xhtml)&amp;) = default; 

<a id="l00067" name="l00067"></a> 67 

<a id="l00073" name="l00073"></a>[ 73](class_d_v_s_1_1_i_var.xhtml#a12b24dd196d3ddf3dbbdc29eca9cca3f) virtual const char* [get\_name](class_d_v_s_1_1_i_var.xhtml#a12b24dd196d3ddf3dbbdc29eca9cca3f)() const = 0;

<a id="l00074" name="l00074"></a> 74 

<a id="l00080" name="l00080"></a>[ 80](class_d_v_s_1_1_i_var.xhtml#ae837af2ee946d8f54695d1abf95c5cda) virtual [dvs\_var\_type](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0) [get\_var\_type](class_d_v_s_1_1_i_var.xhtml#ae837af2ee946d8f54695d1abf95c5cda)() const = 0;

<a id="l00081" name="l00081"></a> 81 

<a id="l00087" name="l00087"></a>[ 87](class_d_v_s_1_1_i_var.xhtml#a7e97f43d3d1057267399c0e66deadd3d) virtual [dvs\_var\_location](dynamic__visualization__store__enums_8h.xhtml#af4f0eba512eff253854b44d7ce078491) [get\_var\_location](class_d_v_s_1_1_i_var.xhtml#a7e97f43d3d1057267399c0e66deadd3d)() const = 0;

<a id="l00088" name="l00088"></a> 88 

<a id="l00097" name="l00097"></a>[ 97](class_d_v_s_1_1_i_var.xhtml#a9dbdd84e6f6342deae82ede6dcf2156e) virtual uint32_t [get\_float\_count\_per\_value](class_d_v_s_1_1_i_var.xhtml#a9dbdd84e6f6342deae82ede6dcf2156e)() const = 0;

<a id="l00098" name="l00098"></a> 98 

<a id="l00104" name="l00104"></a>[ 104](class_d_v_s_1_1_i_var.xhtml#a6aa67cf54eb22ee51a7bf5eeb778cee5) virtual const char* [get\_unit\_dimension](class_d_v_s_1_1_i_var.xhtml#a6aa67cf54eb22ee51a7bf5eeb778cee5)() const = 0;

<a id="l00105" name="l00105"></a> 105 

<a id="l00113" name="l00113"></a>[ 113](class_d_v_s_1_1_i_var.xhtml#aa484336b355e68f93069e97d771e4a6e) virtual const char* [get\_unit\_label](class_d_v_s_1_1_i_var.xhtml#aa484336b355e68f93069e97d771e4a6e)() const = 0;

<a id="l00114" name="l00114"></a> 114 

<a id="l00120" name="l00120"></a>[ 120](class_d_v_s_1_1_i_var.xhtml#acd4c1b8698417ac314a45143e92986d6) virtual const [DVS::IDataset](class_d_v_s_1_1_i_dataset.xhtml)* [get\_dataset](class_d_v_s_1_1_i_var.xhtml#acd4c1b8698417ac314a45143e92986d6)() const = 0;

<a id="l00121" name="l00121"></a> 121 

<a id="l00127" name="l00127"></a>[ 127](class_d_v_s_1_1_i_var.xhtml#a2deab60f72955106a4a4a3f67a0f295e) virtual uint32_t [get\_num\_metadata](class_d_v_s_1_1_i_var.xhtml#a2deab60f72955106a4a4a3f67a0f295e)() const = 0;

<a id="l00128" name="l00128"></a> 128 

<a id="l00135" name="l00135"></a>[ 135](class_d_v_s_1_1_i_var.xhtml#ae18e148e2d2996891560734e53cd9671) virtual const char* [get\_metadata\_key](class_d_v_s_1_1_i_var.xhtml#ae18e148e2d2996891560734e53cd9671)(uint32_t index) const = 0;

<a id="l00136" name="l00136"></a> 136 

<a id="l00143" name="l00143"></a>[ 143](class_d_v_s_1_1_i_var.xhtml#a22432a4b79163a933a850a7a58dfe315) virtual const char* [get\_metadata\_value](class_d_v_s_1_1_i_var.xhtml#a22432a4b79163a933a850a7a58dfe315)(uint32_t index) const = 0;

<a id="l00144" name="l00144"></a> 144 

<a id="l00151" name="l00151"></a>[ 151](class_d_v_s_1_1_i_var.xhtml#a04bb8ee80947c2bd09576961d65d4403) virtual const char* [get\_metadata\_value](class_d_v_s_1_1_i_var.xhtml#a04bb8ee80947c2bd09576961d65d4403)(const char* key) const = 0;

<a id="l00152" name="l00152"></a> 152};



<a id="l00153" name="l00153"></a> 153 

<a id="l00154" name="l00154"></a> 154} //namespace DVS

<a id="l00155" name="l00155"></a> 155 

<a id="l00156" name="l00156"></a> 156\#endif //\_\_\_DVS\_VAR\_INTERFACE\_H\_\_\_

[DVS::IDataset](class_d_v_s_1_1_i_dataset.xhtml)

Interface for datasets for the DVS Reader API.

**Definition** [dvs\_dataset\_interface.h:44](dvs__dataset__interface_8h_source.xhtml#l00043)



[DVS::IVar](class_d_v_s_1_1_i_var.xhtml)

Interface for variables for the DVS Reader API.

**Definition** [dvs\_var\_interface.h:58](#l00057)



[DVS::IVar::get\_metadata\_value](class_d_v_s_1_1_i_var.xhtml#a04bb8ee80947c2bd09576961d65d4403)

virtual const char * get_metadata_value(const char *key) const =0

Get the metadata value based on the key.



[DVS::IVar::~IVar](class_d_v_s_1_1_i_var.xhtml#a0f21e53225c764cb3441f36c32f77bee)

virtual ~IVar()=default

default



[DVS::IVar::IVar](class_d_v_s_1_1_i_var.xhtml#a102df9a173523a896419011582abefb1)

IVar()=default

default



[DVS::IVar::get\_name](class_d_v_s_1_1_i_var.xhtml#a12b24dd196d3ddf3dbbdc29eca9cca3f)

virtual const char * get_name() const =0

Get the name of the variable.



[DVS::IVar::get\_metadata\_value](class_d_v_s_1_1_i_var.xhtml#a22432a4b79163a933a850a7a58dfe315)

virtual const char * get_metadata_value(uint32_t index) const =0

Get the metadata value base on the index.



[DVS::IVar::get\_num\_metadata](class_d_v_s_1_1_i_var.xhtml#a2deab60f72955106a4a4a3f67a0f295e)

virtual uint32_t get_num_metadata() const =0

Get the num metadata values on this var.



[DVS::IVar::get\_unit\_dimension](class_d_v_s_1_1_i_var.xhtml#a6aa67cf54eb22ee51a7bf5eeb778cee5)

virtual const char * get_unit_dimension() const =0

Get the unit dimensions as string.



[DVS::IVar::get\_var\_location](class_d_v_s_1_1_i_var.xhtml#a7e97f43d3d1057267399c0e66deadd3d)

virtual dvs_var_location get_var_location() const =0

Get the var location.



[DVS::IVar::get\_float\_count\_per\_value](class_d_v_s_1_1_i_var.xhtml#a9dbdd84e6f6342deae82ede6dcf2156e)

virtual uint32_t get_float_count_per_value() const =0

Get the number of floats per value.



[DVS::IVar::get\_unit\_label](class_d_v_s_1_1_i_var.xhtml#aa484336b355e68f93069e97d771e4a6e)

virtual const char * get_unit_label() const =0

Get the unit label as string.



[DVS::IVar::operator=](class_d_v_s_1_1_i_var.xhtml#aa7eb6e25ea05a45c383d24ef7483486a)

IVar &amp; operator=(const IVar &amp;)=default

default



[DVS::IVar::IVar](class_d_v_s_1_1_i_var.xhtml#aac24d89cca155832661aaf190e933e30)

IVar(IVar &amp;&amp;)=default

default



[DVS::IVar::get\_dataset](class_d_v_s_1_1_i_var.xhtml#acd4c1b8698417ac314a45143e92986d6)

virtual const DVS::IDataset * get_dataset() const =0

Get the reference dataset for this var.



[DVS::IVar::operator=](class_d_v_s_1_1_i_var.xhtml#ad2bc5d54f4ba396d261698089d3ec263)

IVar &amp; operator=(IVar &amp;&amp;)=default

default



[DVS::IVar::get\_metadata\_key](class_d_v_s_1_1_i_var.xhtml#ae18e148e2d2996891560734e53cd9671)

virtual const char * get_metadata_key(uint32_t index) const =0

Get a metadata key based on the index.



[DVS::IVar::get\_var\_type](class_d_v_s_1_1_i_var.xhtml#ae837af2ee946d8f54695d1abf95c5cda)

virtual dvs_var_type get_var_type() const =0

Get the type of var.



[DVS::IVar::IVar](class_d_v_s_1_1_i_var.xhtml#afd5bd19f8cf769575e1d6f13890c876b)

IVar(const IVar &amp;)=default

support copying



[DVS::VAR\_TYPE](dvs__var__interface_8h.xhtml#a84856d33cb231d1d87a603758b8b8066)

VAR_TYPE

Variable type enum definition.

**Definition** [dvs\_var\_interface.h:41](#l00041)



[dynamic\_visualization\_store\_enums.h](dynamic__visualization__store__enums_8h.xhtml)

Contains enums used in C/C++ API.



[dvs\_var\_location](dynamic__visualization__store__enums_8h.xhtml#af4f0eba512eff253854b44d7ce078491)

dvs_var_location

What variable is associated with.

**Definition** [dynamic\_visualization\_store\_enums.h:18](dynamic__visualization__store__enums_8h_source.xhtml#l00017)



[dvs\_var\_type](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0)

dvs_var_type

Data type of variable.

**Definition** [dynamic\_visualization\_store\_enums.h:30](dynamic__visualization__store__enums_8h_source.xhtml#l00029)



[dynamic\_visualization\_store\_error\_codes.h](dynamic__visualization__store__error__codes_8h.xhtml)

Contains errors used in the DVS C/C++ API.