15#ifndef vtkCellGridIOQuery_h
16#define vtkCellGridIOQuery_h
20#include "vtkIOCellGridModule.h"
22#include <vtk_nlohmannjson.h>
23#include VTK_NLOHMANN_JSON(json.hpp)
25VTK_ABI_NAMESPACE_BEGIN
48 std::vector<vtkCellAttribute*>& attributeList);
57 const std::unordered_map<vtkAbstractArray*, vtkStringToken>& arrayLocations);
114 nlohmann::json*
Data{
nullptr };
Serialize/deserialize vtkCellMetadata records.
nlohmann::json * GetData()
static vtkCellGridIOQuery * New()
bool InsertCellTypeAttributeInfo(vtkCellGrid *grid, const vtkCellAttribute::CellTypeInfo &cellTypeInfo, nlohmann::json &jsonInfo, vtkStringToken cellTypeName)
Insert vtkCellAttribute::CellTypeInfo into the given jsonInfo object for the given cellTypeName.
std::unordered_map< vtkAbstractArray *, vtkStringToken > ArrayLocations
const std::vector< vtkCellAttribute * > & GetAttributeList() const
Return a vector of cell-attributes that matches AttributeData.
nlohmann::json * GetAttributeData()
Return the JSON object that holds attribute data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void PrepareToDeserialize(const nlohmann::json &sourceData, const nlohmann::json &attributeData, std::vector< vtkCellAttribute * > &attributeList)
Prepare to deserialize cell metadata from the given sourceData JSON object.
nlohmann::json & AddMetadataEntry(vtkStringToken cellTypeName)
Add a metadata entry for cellTypeName to the output.
nlohmann::json * AttributeData
void PrepareToSerialize(nlohmann::json &destination, nlohmann::json &attributeData, const std::unordered_map< vtkAbstractArray *, vtkStringToken > &arrayLocations)
Prepare to serialize cell metadata to the given parent JSON object.
const std::unordered_map< vtkAbstractArray *, vtkStringToken > & GetArrayLocations() const
Return the map of array pointers to the names of groups which contain them.
std::unordered_map< vtkAbstractArray *, vtkStringToken > & GetArrayLocations()
~vtkCellGridIOQuery() override=default
std::vector< vtkCellAttribute * > * AttributeList
bool ExtractCellTypeAttributeInfo(vtkCellGrid *grid, vtkCellAttribute::CellTypeInfo &cellTypeInfo, const nlohmann::json &jsonInfo, vtkStringToken cellTypeName)
Extract JSON array information into vtkCellAttribute::CellTypeInfo.
bool IsSerializing() const
Return true if the query is serializing cells (as opposed to deserializing).
vtkCellGridIOQuery()=default
vtkCellGridQuery()=default
Visualization data composed of cells of arbitrary type.
Store on/off settings for data arrays, etc.
Represents and manipulates a collection of data arrays.
topologically and geometrically regular array of data
a simple class to control print indentation
a vtkAbstractArray subclass for strings
Represent a string by its integer hash.