Generated on Wed Apr 29 2015 11:51:41 for GGL-4.1.2 by doxygen 1.8.3.1
Public Member Functions | Static Public Member Functions | Static Private Member Functions
ggl::Rule_GML_writer Class Reference

Rule GML writer. More...

#include <Rule_GML_writer.hh>

Public Member Functions

 Rule_GML_writer ()
 construction More...
 
 ~Rule_GML_writer ()
 destruction More...
 

Static Public Member Functions

static void write (std::ostream &out, const Rule &rule, const bool withSpaces=true)
 
static void writeCompact (std::ostream &out, const Rule &rule, const bool withSpaces=true)
 

Static Private Member Functions

static std::string getContextGML (const Rule::CoreGraph &graph, const Rule::RuleContext &context, const bool withSpaces)
 

Detailed Description

Algorithm wrapper class to write a ggl rule in GGL GML format to stream.
Author
Martin Mann (c) 2013 http://www.bioinf.uni-freiburg.de/~mmann/

Definition at line 20 of file Rule_GML_writer.hh.

Constructor & Destructor Documentation

ggl::Rule_GML_writer::Rule_GML_writer ( )
ggl::Rule_GML_writer::~Rule_GML_writer ( )

Member Function Documentation

static std::string ggl::Rule_GML_writer::getContextGML ( const Rule::CoreGraph graph,
const Rule::RuleContext context,
const bool  withSpaces 
)
staticprivate

Writes the GML part for the given context

Parameters
graphthe rule core graph
contextthe context to print
whetherto print with whitespaces or minimal
Returns
the GML notation for the current context
static void ggl::Rule_GML_writer::write ( std::ostream &  out,
const Rule rule,
const bool  withSpaces = true 
)
static

Writes a boost rule in GGL GML format to stream.

NOTE: currently no constraints are printed...

Parameters
outthe stream to write to
rulethe rule to print
withSpacesif true newlines and white spaces are used to write a user friendly and readable output, otherwise a one-line output with minimal space requirement is produced.
static void ggl::Rule_GML_writer::writeCompact ( std::ostream &  out,
const Rule rule,
const bool  withSpaces = true 
)
static

Writes a boost rule in compacted GGL GML format to stream.

Therin, each node/label occurs only once. To indicate label changes or edge insertions/deletions, a label is in one of the following 4 forms:

  • "C" : the according node/edge has this label left and right = context
  • "L|" : the according edge is removed and the left side label L is given
  • "|R" : the according edge is inserted and the right side label R is given
  • "L|R" : the node label changes from left label L to right label R or the edge changes from valence L to valence R during the reaction
Parameters
outthe stream to write to
rulethe rule to print
withSpacesif true newlines and white spaces are used to write a user friendly and readable output, otherwise a one-line output with minimal space requirement is produced.

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