CGRA-ME
Public Member Functions | Private Attributes | Friends | List of all members
DotParserDriver Class Reference

#include <DotParserDriver.h>

Public Member Functions

 DotParserDriver (std::istream &input, std::string file_name_)
 
ConfigGraph getGraph () &&
 
const ConfigGraphgetGraph () const &
 
const std::string & getFileName () const &
 
std::string & getFileName () &
 
std::logic_error makeError (const yy::location &l, const std::string &m) const
 
void setGraphName (std::string name)
 
void appendGraphAttributes (ConfigStore attrs)
 
void appendDefaultNodeAttributes (ConfigStore new_attrs)
 
void appendDefaultEdgeAttributes (ConfigStore new_attrs)
 
ConfigGraph::VertexID addOrCreateNode (std::string name, ConfigStore custom_attrs={})
 
ConfigGraph::EdgeID addEdge (std::string src_vname, std::string target_vname, ConfigStore custom_attrs={})
 

Private Attributes

std::string file_name
 
ConfigGraph graph = {}
 
ConfigStore default_node_attributes = {}
 
ConfigStore default_edge_attributes = {}
 

Friends

yy::parser::symbol_type yylex (DotParserDriver &d, DOTScannerWrapper &scanner, yy::parser::symbol_type &context)
 

Detailed Description

Definition at line 21 of file DotParserDriver.h.

Constructor & Destructor Documentation

◆ DotParserDriver()

DotParserDriver::DotParserDriver ( std::istream &  input,
std::string  file_name_ 
)

Member Function Documentation

◆ addEdge()

ConfigGraph::EdgeID DotParserDriver::addEdge ( std::string  src_vname,
std::string  target_vname,
ConfigStore  custom_attrs = {} 
)
inline

Create a node, respecting any default edge and default node attributes

Definition at line 76 of file DotParserDriver.h.

◆ addOrCreateNode()

ConfigGraph::VertexID DotParserDriver::addOrCreateNode ( std::string  name,
ConfigStore  custom_attrs = {} 
)
inline

Create a node, respecting any default node attributes

Definition at line 68 of file DotParserDriver.h.

◆ appendDefaultEdgeAttributes()

void DotParserDriver::appendDefaultEdgeAttributes ( ConfigStore  new_attrs)
inline

Definition at line 63 of file DotParserDriver.h.

◆ appendDefaultNodeAttributes()

void DotParserDriver::appendDefaultNodeAttributes ( ConfigStore  new_attrs)
inline

Update the default attributes. Overwrites any duplicate keys

Definition at line 62 of file DotParserDriver.h.

◆ appendGraphAttributes()

void DotParserDriver::appendGraphAttributes ( ConfigStore  attrs)
inline

Definition at line 57 of file DotParserDriver.h.

◆ getFileName() [1/2]

std::string& DotParserDriver::getFileName ( ) &
inline

Definition at line 46 of file DotParserDriver.h.

◆ getFileName() [2/2]

const std::string& DotParserDriver::getFileName ( ) const &
inline

Filename we are parsing. Mutable overloaded needed because bison wants a pointer to mutable string...

Definition at line 45 of file DotParserDriver.h.

◆ getGraph() [1/2]

ConfigGraph DotParserDriver::getGraph ( ) &&
inline

Access the graph. && overload allows for moving the graph out of a rvalue *this

Definition at line 38 of file DotParserDriver.h.

◆ getGraph() [2/2]

const ConfigGraph& DotParserDriver::getGraph ( ) const &
inline

Definition at line 39 of file DotParserDriver.h.

◆ makeError()

std::logic_error DotParserDriver::makeError ( const yy::location &  l,
const std::string &  m 
) const

Make something human readable from the location l and message m.

◆ setGraphName()

void DotParserDriver::setGraphName ( std::string  name)
inline

Set/append graph properties

Definition at line 56 of file DotParserDriver.h.

Friends And Related Function Documentation

◆ yylex

yy::parser::symbol_type yylex ( DotParserDriver d,
DOTScannerWrapper &  scanner,
yy::parser::symbol_type &  context 
)
friend

Member Data Documentation

◆ default_edge_attributes

ConfigStore DotParserDriver::default_edge_attributes = {}
private

Definition at line 92 of file DotParserDriver.h.

◆ default_node_attributes

ConfigStore DotParserDriver::default_node_attributes = {}
private

Definition at line 91 of file DotParserDriver.h.

◆ file_name

std::string DotParserDriver::file_name
private

Definition at line 87 of file DotParserDriver.h.

◆ graph

ConfigGraph DotParserDriver::graph = {}
private

Definition at line 89 of file DotParserDriver.h.


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