docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::serializer::JSONSerializer Class Reference

#include <sdfg/serializer/json_serializer.h>

Inheritance diagram for sdfg::serializer::JSONSerializer:
[legend]

Public Member Functions

 JSONSerializer (bool recurse=true)
virtual nlohmann::json serialize (const sdfg::StructuredSDFG &sdfg, analysis::AnalysisManager *analysis_manager=nullptr, structured_control_flow::Sequence *root=nullptr)
void serialize_node (nlohmann::json &j, const structured_control_flow::ControlFlowNode &node)
std::unique_ptr< sdfg::StructuredSDFG > deserialize (nlohmann::json &j)
void structure_definition_to_json (nlohmann::json &j, const sdfg::types::StructureDefinition &definition)
void type_to_json (nlohmann::json &j, const sdfg::types::IType &type)
void dataflow_to_json (nlohmann::json &j, const sdfg::data_flow::DataFlowGraph &dataflow)
void sequence_to_json (nlohmann::json &j, const sdfg::structured_control_flow::Sequence &sequence)
void block_to_json (nlohmann::json &j, const sdfg::structured_control_flow::Block &block)
void assignment_block_to_json (nlohmann::json &j, const structured_control_flow::AssignmentBlock &block)
void if_else_to_json (nlohmann::json &j, const sdfg::structured_control_flow::IfElse &if_else_node)
void while_node_to_json (nlohmann::json &j, const sdfg::structured_control_flow::While &while_node)
void break_node_to_json (nlohmann::json &j, const sdfg::structured_control_flow::Break &break_node)
void continue_node_to_json (nlohmann::json &j, const sdfg::structured_control_flow::Continue &continue_node)
void return_node_to_json (nlohmann::json &j, const sdfg::structured_control_flow::Return &return_node)
void structured_loop_to_json (nlohmann::json &j, const sdfg::structured_control_flow::StructuredLoop &loop_node)
void debug_info_to_json (nlohmann::json &j, const sdfg::DebugInfo &debug_info)
void schedule_type_to_json (nlohmann::json &j, const sdfg::structured_control_flow::ScheduleType &schedule_type)
void storage_type_to_json (nlohmann::json &j, const sdfg::types::StorageType &storage_type)
void json_to_structure_definition (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder)
void json_to_dataflow (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Block &parent)
control_flow::Assignments parse_assignments (const nlohmann::json &assignments_arr)
void parse_legacy_transition_to_assignment_block (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &parent)
void json_to_sequence (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &sequence)
void json_to_block_node (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &parent)
void json_to_assignment_block (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &parent)
void json_to_if_else_node (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &parent)
void json_to_while_node (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &parent)
void json_to_break_node (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &parent)
void json_to_continue_node (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &parent)
void json_to_return_node (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &parent)
void json_to_structured_loop_node (const nlohmann::json &j, sdfg::builder::StructuredSDFGBuilder &builder, sdfg::structured_control_flow::Sequence &parent)
std::unique_ptr< sdfg::types::IType > json_to_type (const nlohmann::json &j)
std::vector< std::pair< std::string, types::Scalar > > json_to_arguments (const nlohmann::json &j)
DebugInfo json_to_debug_info (const nlohmann::json &j)
ScheduleType json_to_schedule_type (const nlohmann::json &j)
types::StorageType json_to_storage_type (const nlohmann::json &j)
symbolic::Expression json_to_expr (const nlohmann::json &j)

Static Public Member Functions

static void element_metadata_to_json (nlohmann::json &j, const sdfg::Element &element)
static std::string expression (const symbolic::Expression expr)
static void writeToFile (const StructuredSDFG &sdfg, const std::filesystem::path &file)

Public Attributes

bool skip_empty_transitions = false

Constructor & Destructor Documentation

◆ JSONSerializer()

sdfg::serializer::JSONSerializer::JSONSerializer ( bool recurse = true)
inline

Member Function Documentation

◆ assignment_block_to_json()

void sdfg::serializer::JSONSerializer::assignment_block_to_json ( nlohmann::json & j,
const structured_control_flow::AssignmentBlock & block )

◆ block_to_json()

void sdfg::serializer::JSONSerializer::block_to_json ( nlohmann::json & j,
const sdfg::structured_control_flow::Block & block )

◆ break_node_to_json()

void sdfg::serializer::JSONSerializer::break_node_to_json ( nlohmann::json & j,
const sdfg::structured_control_flow::Break & break_node )

◆ continue_node_to_json()

void sdfg::serializer::JSONSerializer::continue_node_to_json ( nlohmann::json & j,
const sdfg::structured_control_flow::Continue & continue_node )

◆ dataflow_to_json()

void sdfg::serializer::JSONSerializer::dataflow_to_json ( nlohmann::json & j,
const sdfg::data_flow::DataFlowGraph & dataflow )

◆ debug_info_to_json()

void sdfg::serializer::JSONSerializer::debug_info_to_json ( nlohmann::json & j,
const sdfg::DebugInfo & debug_info )

◆ deserialize()

std::unique_ptr< sdfg::StructuredSDFG > sdfg::serializer::JSONSerializer::deserialize ( nlohmann::json & j)

◆ element_metadata_to_json()

void sdfg::serializer::JSONSerializer::element_metadata_to_json ( nlohmann::json & j,
const sdfg::Element & element )
static

◆ expression()

std::string sdfg::serializer::JSONSerializer::expression ( const symbolic::Expression expr)
static

◆ if_else_to_json()

void sdfg::serializer::JSONSerializer::if_else_to_json ( nlohmann::json & j,
const sdfg::structured_control_flow::IfElse & if_else_node )

◆ json_to_arguments()

std::vector< std::pair< std::string, types::Scalar > > sdfg::serializer::JSONSerializer::json_to_arguments ( const nlohmann::json & j)

◆ json_to_assignment_block()

void sdfg::serializer::JSONSerializer::json_to_assignment_block ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & parent )

◆ json_to_block_node()

void sdfg::serializer::JSONSerializer::json_to_block_node ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & parent )

◆ json_to_break_node()

void sdfg::serializer::JSONSerializer::json_to_break_node ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & parent )

◆ json_to_continue_node()

void sdfg::serializer::JSONSerializer::json_to_continue_node ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & parent )

◆ json_to_dataflow()

void sdfg::serializer::JSONSerializer::json_to_dataflow ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Block & parent )

◆ json_to_debug_info()

DebugInfo sdfg::serializer::JSONSerializer::json_to_debug_info ( const nlohmann::json & j)

◆ json_to_expr()

symbolic::Expression sdfg::serializer::JSONSerializer::json_to_expr ( const nlohmann::json & j)

◆ json_to_if_else_node()

void sdfg::serializer::JSONSerializer::json_to_if_else_node ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & parent )

◆ json_to_return_node()

void sdfg::serializer::JSONSerializer::json_to_return_node ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & parent )

◆ json_to_schedule_type()

ScheduleType sdfg::serializer::JSONSerializer::json_to_schedule_type ( const nlohmann::json & j)

◆ json_to_sequence()

void sdfg::serializer::JSONSerializer::json_to_sequence ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & sequence )

◆ json_to_storage_type()

types::StorageType sdfg::serializer::JSONSerializer::json_to_storage_type ( const nlohmann::json & j)

◆ json_to_structure_definition()

void sdfg::serializer::JSONSerializer::json_to_structure_definition ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder )

◆ json_to_structured_loop_node()

void sdfg::serializer::JSONSerializer::json_to_structured_loop_node ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & parent )

◆ json_to_type()

std::unique_ptr< sdfg::types::IType > sdfg::serializer::JSONSerializer::json_to_type ( const nlohmann::json & j)

◆ json_to_while_node()

void sdfg::serializer::JSONSerializer::json_to_while_node ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & parent )

◆ parse_assignments()

control_flow::Assignments sdfg::serializer::JSONSerializer::parse_assignments ( const nlohmann::json & assignments_arr)

◆ parse_legacy_transition_to_assignment_block()

void sdfg::serializer::JSONSerializer::parse_legacy_transition_to_assignment_block ( const nlohmann::json & j,
sdfg::builder::StructuredSDFGBuilder & builder,
sdfg::structured_control_flow::Sequence & parent )

◆ return_node_to_json()

void sdfg::serializer::JSONSerializer::return_node_to_json ( nlohmann::json & j,
const sdfg::structured_control_flow::Return & return_node )

◆ schedule_type_to_json()

void sdfg::serializer::JSONSerializer::schedule_type_to_json ( nlohmann::json & j,
const sdfg::structured_control_flow::ScheduleType & schedule_type )

◆ sequence_to_json()

void sdfg::serializer::JSONSerializer::sequence_to_json ( nlohmann::json & j,
const sdfg::structured_control_flow::Sequence & sequence )

◆ serialize()

virtual nlohmann::json sdfg::serializer::JSONSerializer::serialize ( const sdfg::StructuredSDFG & sdfg,
analysis::AnalysisManager * analysis_manager = nullptr,
structured_control_flow::Sequence * root = nullptr )
virtual

◆ serialize_node()

void sdfg::serializer::JSONSerializer::serialize_node ( nlohmann::json & j,
const structured_control_flow::ControlFlowNode & node )

◆ storage_type_to_json()

void sdfg::serializer::JSONSerializer::storage_type_to_json ( nlohmann::json & j,
const sdfg::types::StorageType & storage_type )

◆ structure_definition_to_json()

void sdfg::serializer::JSONSerializer::structure_definition_to_json ( nlohmann::json & j,
const sdfg::types::StructureDefinition & definition )

◆ structured_loop_to_json()

void sdfg::serializer::JSONSerializer::structured_loop_to_json ( nlohmann::json & j,
const sdfg::structured_control_flow::StructuredLoop & loop_node )

◆ type_to_json()

void sdfg::serializer::JSONSerializer::type_to_json ( nlohmann::json & j,
const sdfg::types::IType & type )

◆ while_node_to_json()

void sdfg::serializer::JSONSerializer::while_node_to_json ( nlohmann::json & j,
const sdfg::structured_control_flow::While & while_node )

◆ writeToFile()

void sdfg::serializer::JSONSerializer::writeToFile ( const StructuredSDFG & sdfg,
const std::filesystem::path & file )
static

Member Data Documentation

◆ skip_empty_transitions

bool sdfg::serializer::JSONSerializer::skip_empty_transitions = false

The documentation for this class was generated from the following file: