Skip to main content

Post-processing tools 2023 R2

dvs_object_interface.h

Last update: 17.04.2023
Go to the documentation of this file.
1 /**************************************************************
2 *
3 * (C) 2022 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_OBJECT_INTERFACE_H___
25 #define ___DVS_OBJECT_INTERFACE_H___
26 
29 
30 namespace DVS
31 {
32 
33 class IDataset;
34 
44 class IObject
45 {
46 public:
47 
48  IObject() = default;
49  virtual ~IObject() = default;
50  IObject(IObject&&) = default;
51  IObject& operator=(IObject&&) = default;
52  IObject(const IObject&) = default;
53  IObject& operator=(const IObject&) = default;
54 
60  {
61  PART,
62  PLOT,
63  CASE
64  };
65 
71  virtual const char* get_name() const = 0;
72 
78  virtual ObjectDefType get_type() const = 0;
79 
85  virtual const DVS::IDataset* get_dataset() const = 0;
86 
92  virtual uint32_t get_num_metadata() const = 0;
93 
100  virtual const char* get_metadata_key(uint32_t index) const = 0;
101 
108  virtual const char* get_metadata_value(uint32_t index) const = 0;
109 
116  virtual const char* get_metadata_value(const char* key) const = 0;
117 };
118 
119 } //namespace DVS
120 
121 #endif //___DVS_OBJECT_INTERFACE_H___
Interface for datasets for the DVS Reader API.
Interface for part/plot objects for DVS Reader API.
virtual ~IObject()=default
default
virtual uint32_t get_num_metadata() const =0
Get the number of metadata objects.
virtual const char * get_metadata_value(const char *key) const =0
Get the metadata value object.
virtual const char * get_metadata_key(uint32_t index) const =0
Get the metadata key by index.
virtual ObjectDefType get_type() const =0
Get the type of the object.
virtual const DVS::IDataset * get_dataset() const =0
Get the reference dataset for this object.
virtual const char * get_metadata_value(uint32_t index) const =0
Get the metadata value by index.
ObjectDefType
Enum for object definition type.
@ CASE
Type for a case object, used for case/dataset wide variables.
@ PART
Type for a part object.
@ PLOT
Type for a plot object.
IObject(IObject &&)=default
default
IObject & operator=(IObject &&)=default
default
IObject()=default
default
virtual const char * get_name() const =0
Get the name of the object.
IObject & operator=(const IObject &)=default
default
IObject(const IObject &)=default
support copying
Contains enums used in C/C++ API.
Contains errors used in the DVS C/C++ API.