11 #ifndef JSON_WRITER_F29233A0_535E_4285_AE04_E0E163819CB2 12 #define JSON_WRITER_F29233A0_535E_4285_AE04_E0E163819CB2 17 #define RAPIDJSON_NO_SIZETYPEDEFINE 42 class state_machine_element_model;
43 class transition_model_impl;
44 class simple_state_model;
45 class pseudostate_model_impl;
46 class pseudostate_model;
48 class composite_state_model;
49 class final_state_model;
63 json_writer(
const std::string & _json_file_name,
const model::state_machine_model &_state_machine_model );
69 void write_json_to_file(
const std::string& _json_file,
const model::state_machine_model& _state_machine_model );
71 static void write_text_to_file(
const char* _json_char,
const std::string& _json_file );
72 static void add_version( rapidjson::Value& _document, rapidjson::MemoryPoolAllocator< >& _allocator );
73 static void add_events_from_model(
const model::state_machine_model& _state_machine_model,
74 rapidjson::Value& _events, rapidjson::MemoryPoolAllocator< >& _allocator );
76 static void add_transitions_from_model(
const model::state_machine_model& _state_machine_model,
77 rapidjson::Value& _transitions, rapidjson::MemoryPoolAllocator< >& _allocator );
78 static void add_regions_from_model(
const model::composite_state_model& _composite_state_model,
79 rapidjson::Value& _regions, rapidjson::MemoryPoolAllocator< >& _allocator );
80 static void fill_region_object(
const model::region_model& _region_model, rapidjson::Value& _region,
81 rapidjson::MemoryPoolAllocator< >& _allocator );
82 static void fill_pseudostate_object(
const model::pseudostate_model& _pseudostate_model, rapidjson::Value& _pseudostate,
83 rapidjson::MemoryPoolAllocator< >& _allocator );
84 static void fill_simple_state_object(
const model::simple_state_model& _simple_state_model, rapidjson::Value& _simple_state,
85 rapidjson::MemoryPoolAllocator< >& _allocator );
86 static void fill_composite_state_object(
const model::composite_state_model& _composite_state_model,
87 rapidjson::Value& _composite_state, rapidjson::MemoryPoolAllocator< >& _allocator );
88 static void fill_final_state_object(
const model::final_state_model& _final_state_model,
89 rapidjson::Value& _final_state, rapidjson::MemoryPoolAllocator< >& _allocator );
90 static void add_state_pseudostates_from_model(
const model::composite_state_model& _composite_state_model,
91 rapidjson::Value& _state_pseudostates, rapidjson::MemoryPoolAllocator< >& _allocator );
92 static rapidjson::Value& create_rapidjson_string_value(
const std::string& _string,
93 rapidjson::Value& _json_string_value );
94 static void fill_base_info( rapidjson::Value& _json_val,
const model::state_machine_element_model& _element,
95 rapidjson::MemoryPoolAllocator< >& _allocator );
97 const model::state_machine_model& _state_machine_model );
sxe::uint32_t event_id
The type alias for yasmine model's event IDs.
Definition: event_model_id.hpp:29
std::size_t SizeType
Definition: json_writer.hpp:24
Definition: algorithm_parameters.hpp:16
Provides the ability to write a model to a file.
Definition: json_writer.hpp:20