CBMC
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
json_irept Class Reference

#include <json_irep.h>

Public Member Functions

  To convert to JSON from an irep structure by recursively generating JSON for the different sub trees.
 
  To convert to JSON from an irep structure by recursively generating JSON for the different sub trees.
 
  Deserialize a JSON irep representation.
 

Private Member Functions

  To convert to JSON from a list of ireps that are in an unlabelled subtree.
 
  To convert to JSON from a map of ireps that are in a named subtree.
 

Private Attributes

 

Detailed Description

Definition at line 20 of file json_irep.h.

Constructor & Destructor Documentation

◆  json_irept()

json_irept::json_irept ( bool  _include_comments )
explicit

To convert to JSON from an irep structure by recursively generating JSON for the different sub trees.

Parameters
_include_comments when writing JSON, should the comments sub tree be included.

Definition at line 22 of file json_irep.cpp.

Member Function Documentation

◆  convert_from_irep()

json_objectt json_irept::convert_from_irep ( const ireptirep ) const

To convert to JSON from an irep structure by recursively generating JSON for the different sub trees.

Parameters
irep The irep structure to turn into json
Returns
The json object.

Definition at line 31 of file json_irep.cpp.

◆  convert_from_json()

irept json_irept::convert_from_json ( const jsontin ) const

Deserialize a JSON irep representation.

Parameters
in json object to convert
Returns
result - irep equivalent of input

Definition at line 95 of file json_irep.cpp.

◆  convert_named_sub_tree()

void json_irept::convert_named_sub_tree ( const std::string &  sub_tree_id,
const irept::named_subtsub_trees,
json_objecttparent 
) const
private

To convert to JSON from a map of ireps that are in a named subtree.

The parent JSON object will get a key called sub_tree_id and the value shall be a JSON object whose keys shall be the name of the sub tree and the value will be the object generated from the sub tree.

Parameters
sub_tree_id the name to give the subtree in the parent object
sub_trees the map of subtrees to parse
parent the parent JSON object who should be added to

Definition at line 74 of file json_irep.cpp.

◆  convert_sub_tree()

void json_irept::convert_sub_tree ( const std::string &  sub_tree_id,
const irept::subtsub_trees,
json_objecttparent 
) const
private

To convert to JSON from a list of ireps that are in an unlabelled subtree.

The parent JSON object will get a key called sub_tree_id and the value shall be an array of JSON objects generated from each of the sub trees

Parameters
sub_tree_id the name to give the subtree in the parent object
sub_trees the list of subtrees to parse
parent the parent JSON object who should be added to

Definition at line 50 of file json_irep.cpp.

Member Data Documentation

◆  include_comments

bool json_irept::include_comments
private

Definition at line 38 of file json_irep.h.


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

AltStyle によって変換されたページ (->オリジナル) /