Skip to content

Commit

Permalink
Introduce attribute mode
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Aug 4, 2023
1 parent 42f2bea commit ee6a256
Show file tree
Hide file tree
Showing 2 changed files with 342 additions and 21 deletions.
33 changes: 27 additions & 6 deletions include/openPMD/IO/JSON/JSONIOHandlerImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,24 +257,45 @@ class JSONIOHandlerImpl : public AbstractIOHandlerImpl

std::string m_originalExtension;

enum class SpecificationVia
{
DefaultValue,
Manually
};

/////////////////////
// Dataset IO mode //
/////////////////////

enum class IOMode
{
Dataset,
Template
};

IOMode m_mode = IOMode::Dataset;

enum class SpecificationVia
{
DefaultValue,
Manually
};
SpecificationVia m_IOModeSpecificationVia = SpecificationVia::DefaultValue;

std::pair<IOMode, SpecificationVia>
retrieveDatasetMode(openPMD::json::TracingJSON &config) const;

///////////////////////
// Attribute IO mode //
///////////////////////

enum class AttributeMode
{
Short,
Long
};

AttributeMode m_attributeMode = AttributeMode::Long;
SpecificationVia m_attributeModeSpecificationVia =
SpecificationVia::DefaultValue;

std::pair<AttributeMode, SpecificationVia>
retrieveAttributeMode(openPMD::json::TracingJSON &config) const;

// HELPER FUNCTIONS

// will use the IOHandler to retrieve the correct directory.
Expand Down
Loading

0 comments on commit ee6a256

Please sign in to comment.