Tulip
4.7.0
Better Visualization Through Research
|
Classes | |
class | tlp::AbstractProperty< Tnode, Tedge, Tprop > |
class | tlp::BooleanProperty |
class | tlp::BooleanVectorProperty |
class | tlp::ColorProperty |
class | tlp::ColorVectorProperty |
class | tlp::CoordVectorProperty |
class | tlp::DoubleProperty |
class | tlp::DoubleVectorProperty |
struct | tlp::edge |
class | tlp::Graph |
class | tlp::GraphProperty |
class | tlp::IntegerProperty |
class | tlp::IntegerVectorProperty |
class | tlp::LayoutProperty |
struct | tlp::node |
class | tlp::PropertyInterface |
class | tlp::SizeProperty |
class | tlp::SizeVectorProperty |
class | tlp::StringProperty |
class | tlp::StringVectorProperty |
class | tlp::VectorPropertyInterface |
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) |
Iterator< Graph * > * | tlp::getRootGraphs () |
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::newGraph () |
void | tlp::removeFromGraph (Graph *ioG, BooleanProperty *inSelection=NULL) |
bool | tlp::saveGraph (Graph *graph, const std::string &filename, tlp::PluginProgress *progress=NULL) |
Tulip graphs manipulation system Classes in this group are related to the core system of Graph manipulation.
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
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.
graph | The graph to export. |
outputStream | The stream to export to. Can be a standard ostream, an ofstream, or even a gzipped ostream. |
format | The format to use to export the Graph. |
dataSet | The parameters to pass to the export plugin (e.g. additional data, options for the format) |
progress | A PluginProgress to report the progress of the operation, as well as final state. Defaults to NULL. |
Iterator<Graph*>* tlp::getRootGraphs | ( | ) |
Gets an iterator over the root graphs. That is all the currently existing graphs which have been created using the tlp::newGraph, tlp::loadGraph or tlp::importGraph functions and are the root graphs of an existing graph hierarchy.
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.
format | The format to use to import the graph. |
dataSet | The parameters to pass to the import plugin (file to read, ...) |
progress | A PluginProgress to report the progress of the operation, as well as final state. Defaults to NULL. |
newGraph | The graph to import the data into. This can be usefull to import data into a subgraph. Defaults to NULL. |
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.
filename | The file in tlp format to parse. |
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.
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.
bool tlp::saveGraph | ( | Graph * | graph, |
const std::string & | filename, | ||
tlp::PluginProgress * | progress = NULL |
||
) |
Saves the corresponding 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).
graph | the graph to save. |
filename | the file to save the graph to. |