15 #ifndef vtkCellGridIOQuery_h
16 #define vtkCellGridIOQuery_h
20 #include "vtkIOCellGridModule.h"
22 #include <vtk_nlohmannjson.h>
23 #include VTK_NLOHMANN_JSON(json.hpp) // For API.
25 VTK_ABI_NAMESPACE_BEGIN
47 void PrepareToDeserialize(
const nlohmann::json& sourceData,
const nlohmann::json& attributeData,
48 std::vector<vtkCellAttribute*>& attributeList);
56 void PrepareToSerialize(nlohmann::json& destination, nlohmann::json& attributeData,
57 const std::unordered_map<vtkAbstractArray*, vtkStringToken>& arrayLocations);
63 nlohmann::json*
GetData() {
return this->Data; }
71 return this->ArrayLocations;
75 return this->ArrayLocations;
79 const std::vector<vtkCellAttribute*>&
GetAttributeList()
const {
return *this->AttributeList; }
102 bool InsertCellTypeAttributeInfo(
vtkCellGrid* grid,
114 nlohmann::json* Data{
nullptr };
115 nlohmann::json* AttributeData{
nullptr };
118 bool Serializing{
true };
125 VTK_ABI_NAMESPACE_END
std::unordered_map< vtkAbstractArray *, vtkStringToken > & GetArrayLocations()
Return the JSON object that holds attribute data.
Perform an operation on cells in a vtkCellMetadata instance.
bool IsSerializing() const
Return true if the query is serializing cells (as opposed to deserializing).
a vtkAbstractArray subclass for strings
Serialize/deserialize vtkCellMetadata records.
const std::vector< vtkCellAttribute * > & GetAttributeList() const
Return a vector of cell-attributes that matches AttributeData.
Visualization data composed of cells of arbitrary type.
a simple class to control print indentation
topologically and geometrically regular array of data
Store on/off settings for data arrays, etc.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
nlohmann::json * GetData()
Return the JSON object that holds attribute data.
Represent a string by its integer hash.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
const std::unordered_map< vtkAbstractArray *, vtkStringToken > & GetArrayLocations() const
Return the map of array pointers to the names of groups which contain them.
std::vector< vtkCellAttribute * > * AttributeList
std::unordered_map< vtkAbstractArray *, vtkStringToken > ArrayLocations
Represents and manipulates a collection of data arrays.
nlohmann::json * GetAttributeData()
Return the JSON object that holds attribute data.