> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DVS::IVarHash Class Reference

`#include <dvs_var_hash_interface.h>`

Inheritance diagram for DVS::IVarHash:

![](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/ensight/ensight-apis/2025-r1/class_d_v_s_1_1_i_var_hash.png?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=2b2736dfc4b9a0c63654004fd85720db)

## Public Member Functions

| Type | Name |
| - | - |
| | **IVarHash** ()=default |
|  virtual | **\~IVarHash** ()=default |
| | **IVarHash** ([IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/class_d_v_s_1_1_i_var_hash) &&)=default |
| [IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/class_d_v_s_1_1_i_var_hash) & | **operator=** ([IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/class_d_v_s_1_1_i_var_hash) &&)=default |
| | **IVarHash** (const [IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/class_d_v_s_1_1_i_var_hash) &)=default |
| [IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/class_d_v_s_1_1_i_var_hash) & | **operator=** (const [IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/class_d_v_s_1_1_i_var_hash) &)=default |
| virtual uint32\_t | [get\_var\_hash\_size](#a85c3ade756029207e15b1c8de8cd5c1b) (uint32\_t index, [VAR\_TYPE](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/dvs__var__interface_8h#a84856d33cb231d1d87a603758b8b8066) type=VAR\_TYPE::FLOAT) const =0 |
| virtual uint32\_t | [get\_var\_hash\_size](#a81cd99bbf69ccc0d50e8bcb7dd291046) (const [IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/class_d_v_s_1_1_i_var.md) \*var) const =0 |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/dynamic__visualization__store__error__codes_8h#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_var\_hash](#a17fff1548eb276edd326a0af08f6a7c4) (uint32\_t index, char \*hash, [VAR\_TYPE](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/dvs__var__interface_8h#a84856d33cb231d1d87a603758b8b8066) type=VAR\_TYPE::FLOAT) const =0 |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/dynamic__visualization__store__error__codes_8h#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_var\_hash](#a7348be86da47ac034252a68949b21007) (const [IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/class_d_v_s_1_1_i_var.md) \*var, char \*hash) const =0 |

## Detailed Description

Definition at line [39](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/dvs__var__hash__interface_8h_source.md) of file [dvs\_var\_hash\_interface.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/dvs__var__hash__interface_8h_source.md).

## Member Function Documentation

### get\_var\_hash() \[1/2]

```cpp theme={null}
virtual dvs_ret DVS::IVarHash::get_var_hash(
    const IVar * var,
    char * hash
) const
```

`pure virtual`

Get the hash of the variable data.

The hash of data for DVS objects is a checksum + the hex size of the internal arrays. The size of the has should be retrieved via [IVarHash::get\_var\_hash\_size()](#a85c3ade756029207e15b1c8de8cd5c1b) to be compatible with future hash changes

Error Codes:

* DVS\_NONE: No error
* DVS\_INVALID\_HASH: Hash of data is invalid. There is a problem with the data
* DVS\_PARAM\_INVALID\_VAR: Bad (or null) variable object passed into method
* DVS\_PARAM\_INVALID\_VAR\_ID: Mesh chunk does not have data for var passed in.
* DVS\_PARAM\_NULL: All parameters are null. Method will do nothing.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | var | var of the variable data, not nullptr |
| \[out] | hash | returns a null terminated string of size IVarHash::get\_hash\_size() to be filled if no error |

**Returns**

dvs\_ret DVS\_NONE on no error, otherwise see method description

### get\_var\_hash() \[2/2]

```cpp theme={null}
virtual dvs_ret DVS::IVarHash::get_var_hash(
    uint32_t index,
    char * hash,
    VAR_TYPE type = VAR_TYPE::FLOAT
) const
```

`pure virtual`

Get the hash of the variable data.

The hash of data for DVS objects is a checksum + the hex size of the internal arrays. The size of the has should be retrieved via [IVarHash::get\_var\_hash\_size()](#a85c3ade756029207e15b1c8de8cd5c1b) to be compatible with future hash changes

Error Codes:

* DVS\_NONE: No error
* DVS\_INVALID\_HASH: Hash of data is invalid. There is a problem with the data
* DVS\_PARAM\_OUT\_OF\_BOUNDS: Index out of bounds of \[0, get\_num\_variables() on object this is called on]
* DVS\_PARAM\_NULL: All parameters are null. Method will do nothing.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | the index of the variable data (range 0, get\_num\_variables() on object this is on) |
| \[out] | hash | returns a null terminated string of size IVarHash::get\_hash\_size() to be filled if no error |
| \[in] | type | the enum type. By default, VAR\_TYPE::FLOAT |

**Returns**

dvs\_ret DVS\_NONE on no error, otherwise see method description

### get\_var\_hash\_size() \[1/2]

```cpp theme={null}
virtual uint32_t DVS::IVarHash::get_var_hash_size(const IVar * var) const
```

`pure virtual`

Get the size of the hash to use with [IVarHash::get\_var\_hash()](#a17fff1548eb276edd326a0af08f6a7c4)

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | var | the variable definition to retrieve nodal variable data for |

**Returns**

uint32\_t the size of the hash from [IVarHash::get\_var\_hash()](#a17fff1548eb276edd326a0af08f6a7c4), 0 if invalid var

### get\_var\_hash\_size() \[2/2]

```cpp theme={null}
virtual uint32_t DVS::IVarHash::get_var_hash_size(
    uint32_t index,
    VAR_TYPE type = VAR_TYPE::FLOAT
) const
```

`pure virtual`

Get the size of the hash to use with [IVarHash::get\_var\_hash()](#a17fff1548eb276edd326a0af08f6a7c4)

**Parameters**

| Direction | Name | Description |
| - | - | - |
| | index | index of the variable data (range 0, get\_num\_variables() on object this is on) |
| \[in] | type | the enum type. By default, VAR\_TYPE::FLOAT |

**Returns**

uint32\_t the size of the hash from [IVarHash::get\_var\_hash()](#a17fff1548eb276edd326a0af08f6a7c4), 0 if invalid index

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

* D:/ANSYSDev/Product-src/ensight/user\_defined\_src/readers/dvs/include/[dvs\_var\_hash\_interface.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r1/dvs__var__hash__interface_8h_source.md)
