Skip to main content

EnSight 2025 R2

dvs_query_interface

Last update: 16.07.2025
Go to the documentation of this file.
1/**************************************************************
2*
3* (C) 2022-2025 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
30#ifndef ___DVS_QUERY_INTERFACE_H___
31#define ___DVS_QUERY_INTERFACE_H___
32
33#include <map>
34#include <string>
39#include "dvs_var_interface.h"
42#include "logger_interface.h"
43
44
45#include "dvs_import_export.h"
46
47namespace DVS
48{
78class IQuery
79{
80public:
81
82 IQuery() = default;
83 virtual ~IQuery() = default;
84 IQuery(IQuery&&) = default;
85 IQuery& operator=(IQuery&&) = default;
86 IQuery(const IQuery&) = default;
87 IQuery& operator=(const IQuery&) = default;
88
96 virtual void release() = 0;
97
108 virtual void set_logger(DVS::ILogger* logger) = 0;
109
128 virtual dvs_ret add_uri(const char* uri) = 0;
129
147 virtual dvs_ret get_num_servers(const char* uri, uint32_t& num_servers) = 0;
148
164 virtual void set_server_mod(uint32_t server_num, uint32_t server_mod) = 0;
165
182 virtual DVS::IQuery* filter(const char* filter) = 0;
183
198 virtual dvs_ret get_num_ranks(uint32_t& num_ranks) = 0;
199
215 virtual dvs_ret get_ranks(uint32_t* ranks) = 0;
216
234 virtual dvs_ret get_num_chunks_per_rank(uint32_t& num_chunks) = 0;
235
255 virtual dvs_ret get_chunks_per_rank(uint32_t* chunks) = 0;
256
272 virtual dvs_ret get_num_datasets(uint32_t& num_datasets) = 0;
273
282 virtual DVS::IDataset* get_dataset(uint32_t index) = 0;
283
298 virtual dvs_ret get_num_parts(uint32_t& num_parts) = 0;
299
308 virtual const DVS::IObject* get_part(uint32_t index) = 0;
309
324 virtual dvs_ret get_num_plots(uint32_t& num_plots) = 0;
325
334 virtual const DVS::IObject* get_plot(uint32_t index) = 0;
335
362 const DVS::IVar* var,
363 float time,
364 float* values) = 0;
365
380 virtual dvs_ret get_num_variables(uint32_t& num_vars) = 0;
381
390 virtual const DVS::IVar* get_variable(uint32_t index) = 0;
391
411 virtual dvs_ret get_num_timesteps(uint32_t& num_timesteps) = 0;
412
431 virtual dvs_ret get_timesteps(float* timesteps) = 0;
432
452 virtual dvs_ret get_num_mesh_chunks(uint32_t& num_mesh_chunks) = 0;
453
462 virtual DVS::IMeshChunk* get_mesh_chunk(uint32_t index) = 0;
463
483 virtual dvs_ret get_num_plot_chunks(uint32_t& num_plot_chunks) = 0;
484
493 virtual DVS::IPlotChunk* get_plot_chunk(uint32_t index) = 0;
494
512 virtual dvs_ret get_hash_available(const char* hash, bool& available) = 0;
513
517 virtual void clear_data() = 0;
518
519};
520
527} //namespace DVS
528
529#endif //___DVS_QUERY_INTERFACE_H___
Interface for datasets for the DVS Reader API.
Interface for a logger to be used by DVS::IClient.
Mesh Chunk Interface for DVS Reader API.
Interface for part/plot objects for DVS Reader API.
Plot Chunk Interface for DVS Reader API.
The query interface for the DVS Reader API.
virtual DVS::IMeshChunk * get_mesh_chunk(uint32_t index)=0
Get the mesh chunk based on the index.
virtual dvs_ret get_num_servers(const char *uri, uint32_t &num_servers)=0
Get the num servers object.
virtual DVS::IPlotChunk * get_plot_chunk(uint32_t index)=0
Get the plot chunk based on the index.
virtual dvs_ret get_num_mesh_chunks(uint32_t &num_mesh_chunks)=0
Get the number of mesh chunks for this query.
IQuery()=default
default
IQuery & operator=(const IQuery &)=default
default
virtual void release()=0
Release the memory of the query.
virtual void clear_data()=0
Clear the current query.
virtual dvs_ret get_num_parts(uint32_t &num_parts)=0
Get the number of parts for this query.
virtual dvs_ret get_num_variables(uint32_t &num_vars)=0
Get the number of variables for this query.
IQuery(IQuery &&)=default
default
virtual dvs_ret get_num_timesteps(uint32_t &num_timesteps)=0
Get the number of timesteps.
virtual dvs_ret get_ranks(uint32_t *ranks)=0
Get the unique ranks for this filtered query.
virtual dvs_ret get_num_datasets(uint32_t &num_datasets)=0
Get the number of datasets objects.
virtual dvs_ret get_chunks_per_rank(uint32_t *chunks)=0
Get an array of the number of chunks for every rank for this query.
virtual const DVS::IObject * get_part(uint32_t index)=0
Get the part based on the index.
virtual ~IQuery()=default
default
IQuery & operator=(IQuery &&)=default
default
virtual DVS::IDataset * get_dataset(uint32_t index)=0
Get the dataset object.
virtual const DVS::IObject * get_plot(uint32_t index)=0
Get the plot object based on the index.
virtual dvs_ret get_hash_available(const char *hash, bool &available)=0
Get if the hash is available in the blobstore.
virtual DVS::IQuery * filter(const char *filter)=0
The filter method will allocate a new chained query with the passed in filter appended to it.
virtual dvs_ret get_variable_data(const DVS::IObject *object, const DVS::IVar *var, float time, float *values)=0
Get variable values for dataset and part objects.
virtual dvs_ret get_num_plot_chunks(uint32_t &num_plot_chunks)=0
Get the number of plot chunks for this query.
virtual dvs_ret get_num_chunks_per_rank(uint32_t &num_chunks)=0
Get the number of chunks for each rank.
virtual dvs_ret get_num_ranks(uint32_t &num_ranks)=0
Get the number of ranks for this filtered query.
virtual dvs_ret get_num_plots(uint32_t &num_plots)=0
Get the number of plots for this query.
virtual void set_logger(DVS::ILogger *logger)=0
Set the logger object.
virtual const DVS::IVar * get_variable(uint32_t index)=0
Get the variable object based on the index.
virtual void set_server_mod(uint32_t server_num, uint32_t server_mod)=0
Set a filter based on the server number and a modulus.
virtual dvs_ret get_timesteps(float *timesteps)=0
Get the timesteps object.
virtual dvs_ret add_uri(const char *uri)=0
Add a URI for the reader API to iterate over.
IQuery(const IQuery &)=default
support copying
Interface for variables for the DVS Reader API.
DVS Reader API Dataset Interface.
DVS Reader API Mesh Chunk Interface.
DVS Reader API Object Interface.
DVS Reader API Plot Chunk Interface.
DVS_DLL_EXPORT IQuery * CREATE_QUERY_INSTANCE()
Create a query interface object.
DVS Reader API Variable Interface.
Contains enums used in C/C++ API.
Contains errors used in the DVS C/C++ API.
int32_t dvs_ret
Return value of methods, TODO.
Logger Interface Class.

Connect with Ansys