VTK  9.3.20241006
vtkXdmf3ArraySelection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
15#ifndef vtkXdmf3ArraySelection_h
16#define vtkXdmf3ArraySelection_h
17
18#include "vtkIOXdmf3Module.h" // For export macro
19
20#include <map> //for superclass template
21#include <string> //for superclass's content type
22
23#ifdef _MSC_VER
24#pragma warning(push) // save
25#pragma warning(disable : 4251) // needs to have dll-interface to be used by clients of class
26#endif
27VTK_ABI_NAMESPACE_BEGIN
28class VTKIOXDMF3_EXPORT vtkXdmf3ArraySelection : public std::map<std::string, bool>
29{
30public:
34 void Merge(const vtkXdmf3ArraySelection& other);
35
39 void AddArray(const char* name, bool status = true);
40
44 bool ArrayIsEnabled(const char* name);
45
49 bool HasArray(const char* name);
50
52
55 void SetArrayStatus(const char* name, bool status);
56 int GetArraySetting(const char* name);
58
62 const char* GetArrayName(int index);
63
68};
69#ifdef _MSC_VER
70#pragma warning(pop) // restore
71#endif
72
73VTK_ABI_NAMESPACE_END
74#endif // # vtkXdmf3ArraySelection_h
75// VTK-HeaderTest-Exclude: vtkXdmf3ArraySelection.h
helper to identify requested arrays with
void SetArrayStatus(const char *name, bool status)
get/set user choice of whether a particular array is to be loaded
const char * GetArrayName(int index)
get string name of a particular array
void AddArray(const char *name, bool status=true)
add a new array to the set, with a particular status
int GetNumberOfArrays()
get number of arrays in the set
int GetArraySetting(const char *name)
get/set user choice of whether a particular array is to be loaded
bool HasArray(const char *name)
check if a particular array is in the set yet or not
void Merge(const vtkXdmf3ArraySelection &other)
used in parallel to send of combine sets
bool ArrayIsEnabled(const char *name)
test if a particular array is enablled or not