|
vg
tools for working with variation graphs
|
#include <explainer.hpp>
Public Member Functions | |
| TSVExplainer (bool enabled, const std::string &name="data") | |
| ~TSVExplainer () | |
| Close out the file being explained to. | |
| void | line () |
| Start a new line. Must call this before field(). | |
| template<typename T> | |
| void | field (const T &value) |
| Add a field with any value that can be <<'d into a stream. | |
| Public Member Functions inherited from vg::Explainer | |
| Explainer (bool enabled) | |
| Construct an Explainer that will save to one or more files. | |
| virtual | ~Explainer () |
| Close out the files being explained to. | |
| operator bool () const | |
Protected Attributes | |
| ofstream | out |
| Stream being written to. | |
| bool | need_tab = false |
| Whether we need a tab befroe the next value. | |
| bool | need_line = false |
| Whether we need a newline before the next line. | |
| Protected Attributes inherited from vg::Explainer | |
| size_t | explanation_number |
| What number explanation are we? Distinguishes different objects. | |
| bool | enabled |
| Determines if this explainer should generate explanations. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from vg::Explainer | |
| static void | set_context (const std::string &context) |
| static void | clear_context () |
| Clear the current per-thread context. | |
| Static Public Attributes inherited from vg::Explainer | |
| static bool | save_explanations = false |
| Protected Member Functions inherited from vg::Explainer | |
| bool | explaining () const |
| Function to check if we should be explaining. | |
| Static Protected Member Functions inherited from vg::Explainer | |
| static size_t | get_new_explanation_number () |
| static std::string | make_filename (const std::string &base_name, const std::string &extension) |
| 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. | |
| static size_t | next_context_explanation_number {0} |
| static std::string | current_context = "" |
| Current thing (possibly a read name) being explained (for organizing into directories). | |
Widget to log a TSV of data as an explanation.
| vg::TSVExplainer::TSVExplainer | ( | bool | enabled, |
| const std::string & | name = "data" ) |
Construct a TSVExplainer that will save a table to a file. Uses the current read context from Explainer::set_context() if set.
| vg::TSVExplainer::~TSVExplainer | ( | ) |
Close out the file being explained to.
| void vg::TSVExplainer::field | ( | const T & | value | ) |
Add a field with any value that can be <<'d into a stream.
| void vg::TSVExplainer::line | ( | ) |
Start a new line. Must call this before field().
|
protected |
Whether we need a newline before the next line.
|
protected |
Whether we need a tab befroe the next value.
|
protected |
Stream being written to.
1.17.0