Tulip  4.3.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
Graph model

Classes

class  tlp::AbstractProperty< Tnode, Tedge, Tprop >
 This class extends upon PropertyInterface, and adds type-safe methods to get and set the node and edge values, through the magic of template programming. More...
 
class  tlp::BooleanProperty
 A graph property that maps a boolean value to graph elements. More...
 
class  tlp::BooleanVectorProperty
 A graph property that maps a std::vector<bool> value to graph elements. More...
 
class  tlp::ColorProperty
 A graph property that maps a tlp::Color value to graph elements. More...
 
class  tlp::ColorVectorProperty
 A graph property that maps a std::vector<tlp::Color> value to graph elements. More...
 
class  tlp::CoordVectorProperty
 A graph property that maps a std::vector<tlp::Coord> value to graph elements. More...
 
class  tlp::DoubleProperty
 A graph property that maps a double value to graph elements. More...
 
class  tlp::DoubleVectorProperty
 A graph property that maps a std::vector<double> value to graph elements. More...
 
struct  tlp::edge
 The edge struct represents an edge in a Graph object. More...
 
class  tlp::Graph
 
class  tlp::GraphProperty
 A graph property that maps a tlp::Graph* value to graph elements. More...
 
class  tlp::LayoutProperty
 A graph property that maps a tlp::Coord value to graph nodes and std::vector<tlp::Coord> for edges. More...
 
class  tlp::PropertyInterface::MetaValueCalculator
 Base class for computing values on meta nodes and edges. More...
 
class  tlp::AbstractProperty< Tnode, Tedge, Tprop >::MetaValueCalculator
 This class is used to delegate the computation of the values associated to meta nodes or edges. More...
 
struct  tlp::node
 The node struct represents a node in a Graph object. More...
 
class  tlp::PropertyInterface
 PropertyInterface describes the interface of a graph property. More...
 
class  tlp::SizeProperty
 A graph property that maps a tlp::Size value to graph elements. More...
 
class  tlp::SizeVectorProperty
 A graph property that maps a std::vector<tlp::Size> value to graph elements. More...
 
class  tlp::StringProperty
 A graph property that maps a std::string value to graph elements. More...
 
class  tlp::StringVectorProperty
 A graph property that maps a std::vector<std::string> value to graph elements. More...
 

Functions

void tlp::copyToGraph (Graph *outG, const Graph *inG, BooleanProperty *inSelection=NULL, BooleanProperty *outSelection=NULL)
 
bool tlp::exportGraph (Graph *graph, std::ostream &outputStream, const std::string &format, DataSet &dataSet, PluginProgress *progress=NULL)
 
Graph * tlp::importGraph (const std::string &format, DataSet &dataSet, PluginProgress *progress=NULL, Graph *newGraph=NULL)
 
Graph * tlp::loadGraph (const std::string &filename, tlp::PluginProgress *progress=NULL)
 
Graph * tlp::newCloneSubGraph (Graph *graph, std::string name="unnamed")
 
Graph * tlp::newGraph ()
 
Graph * tlp::newSubGraph (Graph *graph, std::string name="unnamed")
 
void tlp::removeFromGraph (Graph *ioG, BooleanProperty *inSelection=NULL)
 
bool tlp::saveGraph (Graph *graph, const std::string &filename, tlp::PluginProgress *progress=NULL)
 

Detailed Description

Tulip graphs manipulation system Classes in this group are related to the core system of Graph manipulation.

Function Documentation

void tlp::copyToGraph ( Graph *  outG,
const Graph *  inG,
BooleanProperty *  inSelection = NULL,
BooleanProperty *  outSelection = NULL 
)

Appends the selected part of the graph inG (properties, nodes and edges) into the graph outG. If no selection is done (inSel=NULL), the whole inG graph is appended. The output selection is used to select the appended nodes & edges

Warning
The input selection is extended to all selected edge ends.
bool tlp::exportGraph ( Graph *  graph,
std::ostream &  outputStream,
const std::string &  format,
DataSet &  dataSet,
PluginProgress *  progress = NULL 
)

Exports a graph using the specified export plugin with parameters stored in the DataSet.

You determine the destination, whether by using a fstream, or by saving the contents of the stream to the destination of your choice.

Parameters
graphThe graph to export.
outputStreamThe stream to export to. Can be a standard ostream, an ofstream, or even a gzipped ostream.
formatThe format to use to export the Graph.
dataSetThe parameters to pass to the export plugin (e.g. additional data, options for the format)
progressA PluginProgress to report the progress of the operation, as well as final state. Defaults to NULL.
Returns
bool Whether the export was successfull or not.
Graph* tlp::importGraph ( const std::string &  format,
DataSet &  dataSet,
PluginProgress *  progress = NULL,
Graph *  newGraph = NULL 
)

Imports a graph using the specified import plugin with the parameters stored in the DataSet.

If no graph is passed, then a new graph will be created. You can pass a graph in order to import data into it. Returns the graph with imported data, or NULL if the import failed. In this case, the Pluginprogress should have an error that can be displayed.

Parameters
formatThe format to use to import the graph.
dataSetThe parameters to pass to the import plugin (file to read, ...)
progressA PluginProgress to report the progress of the operation, as well as final state. Defaults to NULL.
newGraphThe graph to import the data into. This can be usefull to import data into a subgraph. Defaults to NULL.
Returns
:Graph* The graph containing the imported data, or NULL in case of failure.
Examples:
clique_import/cliqueimport.cpp.
Graph* tlp::loadGraph ( const std::string &  filename,
tlp::PluginProgress progress = NULL 
)

Loads a graph in the tlp format from a file (extension can be .tlp or .tlp.gz). This function uses the "TLP Import" import plugin, and will fail if it is not loaded (By default this plugin is linked into the library and should be loaded).

If the import fails (no such file, parse error, ...) NULL is returned.

Parameters
filenameThe file in tlp format to parse.
Returns
:Graph* The imported Graph, NULL if the import failed.
Examples:
graph_display/graph_display.cpp.
Graph* tlp::newCloneSubGraph ( Graph *  graph,
std::string  name = "unnamed" 
)

Creates and returns a subgraph of the graph that is equal to root (a clone subgraph).

Deprecated:
this function should not be used anymore, please use Graph::addCloneSubGraph() instead.
Parameters
graphThe Graph on which to create a clone subgraph.
nameThe name of the newly created subgraph. Defaults to "unnamed".
Returns
:Graph* The newly created clone subgraph.
Graph* tlp::newGraph ( )

Creates a new, empty graph.

This is a simple method factory to create a Graph implementation (remember, Graph is only an interface).

This is the recommended way to create a new Graph.

Returns
:Graph* A new, empty graph.
Graph* tlp::newSubGraph ( Graph *  graph,
std::string  name = "unnamed" 
)

Creates and returns an empty subgraph of the given graph.

Deprecated:
this function should not be used anymore, please use Graph::addSubGraph() instead.
Parameters
graphThe graph to add an empty subgraph to.
nameThe name of the new subgraph. Defaults to "unnamed".
Returns
:Graph* The newly created subgraph.
void tlp::removeFromGraph ( Graph *  ioG,
BooleanProperty *  inSelection = NULL 
)

Removes the selected part of the graph ioG (properties values, nodes and edges). If no selection is done (inSel=NULL), the whole graph is reseted to default value.

Warning
The selection is extended to all selected edge ends.
bool tlp::saveGraph ( Graph *  graph,
const std::string &  filename,
tlp::PluginProgress progress = NULL 
)

Saves the corresponding root graph and all its subgraphs to a file using the tlp format. Extension of the file can be either .tlp (human-readable text file) or .tlp.gz (gzipped text file).

This function checks the file name for the '.gz' extension and uses a compressed output if found.

This function uses the "TLP Export" export plugin, and will fail if it is not loaded (by default this plugin is linked into the library and should be loaded).

Parameters
graphthe graph to save.
filenamethe file to save the graph to.
Returns
bool Whether the export was successfull or not.