Adaptagrams
Public Member Functions | Public Attributes | List of all members
topology::ColaTopologyAddon Class Reference

This class can be passed to libcola to replace some functionality to provide topology preserving layout. More...

#include <cola_topology_addon.h>

Inheritance diagram for topology::ColaTopologyAddon:
Inheritance graph
Collaboration diagram for topology::ColaTopologyAddon:
Collaboration graph

Public Member Functions

 ColaTopologyAddon ()
 Constructs an empty ColaTopologyAddon instance for collecting topology information. More...
 
 ColaTopologyAddon (topology::Nodes &tnodes, topology::Edges &routes)
 Constructs a ColaTopologyAddon instance with a specified set of topology information. More...
 
void writeSVGFile (std::string filename=std::string())
 Writes an SVG file displaying the current topology of the nodes and edges. More...
 

Public Attributes

topology::Nodes topologyNodes
 Topology information: node positions and sizes.
 
topology::Edges topologyRoutes
 Topology information: edges routes.
 

Detailed Description

This class can be passed to libcola to replace some functionality to provide topology preserving layout.

You should instantiate this class with a given set of nodes and edges to preserve and pass it to cola::ConstrainedFDLayout::setTopology().

Constructor & Destructor Documentation

◆ ColaTopologyAddon() [1/2]

topology::ColaTopologyAddon::ColaTopologyAddon ( )

Constructs an empty ColaTopologyAddon instance for collecting topology information.

Passing libcola an empty instance of this class will cause libcola to populate it with current topology information for nodes and edges when cola::ConstrainedFDLayout::makeFeasible() is run. This information is then available in the topologyNodes and topologyRoutes member variables.

◆ ColaTopologyAddon() [2/2]

topology::ColaTopologyAddon::ColaTopologyAddon ( topology::Nodes tnodes,
topology::Edges routes 
)

Constructs a ColaTopologyAddon instance with a specified set of topology information.

Passing libcola an instance of this class with given topology information will cause libcola to generate topology preserving constraints to prevent nodes from crossing edges, and for the topology of the network to be preserved during layout.

This topology information is usually not constructed from scratch but rather extracted from an empty ColaTopologyAddon instance after COLA has determined a feasible layout for it.

Parameters
[in]tnodesTopology information for nodes.
[in]routesTopology information for edges.

Member Function Documentation

◆ writeSVGFile()

void topology::ColaTopologyAddon::writeSVGFile ( std::string  filename = std::string())

Writes an SVG file displaying the current topology of the nodes and edges.

Parameters
[in]filenameA string indicating the filename (without extension) for the output file. Defaults to "libtopology-cola.svg" if no filename is given.

References topologyNodes, and topologyRoutes.


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