|
vg
tools for working with variation graphs
|
#include <explainer.hpp>
Public Member Functions | |
| ProblemDumpExplainer (const std::string &name="problem") | |
| Construct a ProblemDumpExplainer that will save a dump of a problem to a file. | |
| ~ProblemDumpExplainer () | |
| Close out the file being explained to. | |
| void | object_start () |
| Begin an object in a value context. | |
| void | object_end () |
| End an object after its last value. | |
| void | array_start () |
| Begin an array in a value context. | |
| void | array_end () |
| End an array after its last value. | |
| void | key (const std::string &k) |
| Put the key for a value, inside an object. | |
| void | value (const std::string &v) |
| void | value (double v) |
| Put a value after a key or in an array. | |
| void | value (size_t v) |
| Put a value after a key or in an array. | |
| void | value (int v) |
| Put a value after a key or in an array. | |
| void | value (bool v) |
| Put a value after a key or in an array. | |
| void | value (vg::id_t v) |
| Put a value after a key or in an array. | |
| void | value (const pos_t &v) |
| void | value (const HandleGraph &v) |
| void | value (const handle_t &v, const HandleGraph &context) |
Public Member Functions inherited from vg::Explainer | |
| Explainer () | |
| Construct an Explainer that will save to one or more files. | |
| virtual | ~Explainer () |
| Close out the files being explained to. | |
Protected Member Functions | |
| void | comma () |
| Write a separating comma if needed. | |
Protected Attributes | |
| ofstream | out |
| Stream being written to. | |
| bool | need_comma = false |
| Whether we need a comma before the next key or value. | |
Protected Attributes inherited from vg::Explainer | |
| size_t | explanation_number |
| What number explanation are we? Distinguishes different objects. | |
Additional Inherited Members | |
Static Public Attributes inherited from vg::Explainer | |
| static bool | save_explanations = false |
| Determine if explanations should be generated. | |
Static Protected Attributes inherited from vg::Explainer | |
| static std::atomic< size_t > | next_explanation_number {0} |
| Counter used to give different explanations their own unique filenames. | |
Widget to serialize somewhat structured logs.
| vg::ProblemDumpExplainer::ProblemDumpExplainer | ( | const std::string & | name = "problem" | ) |
Construct a ProblemDumpExplainer that will save a dump of a problem to a file.
| vg::ProblemDumpExplainer::~ProblemDumpExplainer | ( | ) |
Close out the file being explained to.
| void vg::ProblemDumpExplainer::array_end | ( | ) |
End an array after its last value.
| void vg::ProblemDumpExplainer::array_start | ( | ) |
Begin an array in a value context.
|
inlineprotected |
Write a separating comma if needed.
| void vg::ProblemDumpExplainer::key | ( | const std::string & | k | ) |
Put the key for a value, inside an object.
| void vg::ProblemDumpExplainer::object_end | ( | ) |
End an object after its last value.
| void vg::ProblemDumpExplainer::object_start | ( | ) |
Begin an object in a value context.
| void vg::ProblemDumpExplainer::value | ( | bool | v | ) |
Put a value after a key or in an array.
| void vg::ProblemDumpExplainer::value | ( | const handle_t & | v, |
| const HandleGraph & | context | ||
| ) |
Put a value after a key or in an array. Represents a handle as a vg Protobuf Position.
| void vg::ProblemDumpExplainer::value | ( | const HandleGraph & | v | ) |
Put a value after a key or in an array. Represents the graph as a single chunk vg Protobuf Graph.
| void vg::ProblemDumpExplainer::value | ( | const pos_t & | v | ) |
Put a value after a key or in an array. Represents the position as a vg Protobuf Position.
| void vg::ProblemDumpExplainer::value | ( | const std::string & | v | ) |
Put a value after a key or in an array. Assumes the string is pre-escaped.
| void vg::ProblemDumpExplainer::value | ( | double | v | ) |
Put a value after a key or in an array.
| void vg::ProblemDumpExplainer::value | ( | int | v | ) |
Put a value after a key or in an array.
| void vg::ProblemDumpExplainer::value | ( | size_t | v | ) |
Put a value after a key or in an array.
| void vg::ProblemDumpExplainer::value | ( | vg::id_t | v | ) |
Put a value after a key or in an array.
|
protected |
Whether we need a comma before the next key or value.
|
protected |
Stream being written to.
1.9.8