vg
tools for working with variation graphs
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
vg::Explainer Class Reference

#include <explainer.hpp>

Inheritance diagram for vg::Explainer:
vg::DiagramExplainer vg::DotDumpExplainer< T > vg::ProblemDumpExplainer vg::SubgraphExplainer vg::TSVExplainer

Public Member Functions

 Explainer (bool enabled)
 Construct an Explainer that will save to one or more files. More...
 
virtual ~Explainer ()
 Close out the files being explained to. More...
 
 operator bool () const
 

Static Public Attributes

static bool save_explanations = false
 Determine if explanations should be generated. More...
 

Protected Member Functions

bool explaining () const
 Function to check if we should be explaining. More...
 

Protected Attributes

size_t explanation_number
 What number explanation are we? Distinguishes different objects. More...
 
bool enabled
 Determines if this explainer should generate explanations. More...
 

Static Protected Attributes

static std::atomic< size_t > next_explanation_number {0}
 Counter used to give different explanations their own unique filenames. More...
 

Detailed Description

Base explainer class. Handles making sure each explanation has a different unique number.

Constructor & Destructor Documentation

◆ Explainer()

vg::Explainer::Explainer ( bool  enabled)

Construct an Explainer that will save to one or more files.

◆ ~Explainer()

vg::Explainer::~Explainer ( )
virtual

Close out the files being explained to.

Member Function Documentation

◆ explaining()

bool vg::Explainer::explaining ( ) const
inlineprotected

Function to check if we should be explaining.

◆ operator bool()

vg::Explainer::operator bool ( ) const
inline

Conversion to bool so you can use an explainer as a condition on code to write to it.

Member Data Documentation

◆ enabled

bool vg::Explainer::enabled
protected

Determines if this explainer should generate explanations.

◆ explanation_number

size_t vg::Explainer::explanation_number
protected

What number explanation are we? Distinguishes different objects.

◆ next_explanation_number

std::atomic< size_t > vg::Explainer::next_explanation_number {0}
staticprotected

Counter used to give different explanations their own unique filenames.

◆ save_explanations

bool vg::Explainer::save_explanations = false
static

Determine if explanations should be generated.


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