Public Member Functions |
| | Graph () |
| virtual | ~Graph () |
| bool | applyAlgorithm (const std::string &algorithm, std::string &errorMessage, DataSet *dataSet=NULL, PluginProgress *progress=NULL) |
| | Applies an algorithm plugin, identified by its name. Algorithm plugins are subclasses of the tlp::Algorithm interface. Parameters are transmitted to the algorithm trough the DataSet. To determine a plugin's parameters, you can either:
|
| virtual void | clear ()=0 |
| | Removes all nodes, edges and sub-graphs of the supergraph.
|
| virtual Graph * | addSubGraph (BooleanProperty *selection=NULL, unsigned int id=0, std::string name="unnamed")=0 |
| | Creates and returns a new sub-graph of this graph.
|
| Graph * | addSubGraph (std::string name) |
| | Creates and returns a new named sub-graph of this graph.
|
| Graph * | addCloneSubGraph (std::string name="unnamed") |
| | Creates and returns a subgraph of this graph that contains all its elements.
|
| Graph * | inducedSubGraph (const std::set< node > &nodeSet, Graph *parentSubGraph=NULL) |
| virtual void | delSubGraph (Graph *)=0 |
| virtual void | delAllSubGraphs (Graph *)=0 |
| virtual Graph * | getSuperGraph () const =0 |
| virtual Graph * | getRoot () const =0 |
| virtual void | setSuperGraph (Graph *)=0 |
| virtual Iterator< Graph * > * | getSubGraphs () const =0 |
| virtual bool | isSubGraph (const Graph *sg) const =0 |
| virtual bool | isDescendantGraph (const Graph *sg) const =0 |
| virtual Graph * | getSubGraph (unsigned int id) const =0 |
| virtual Graph * | getSubGraph (const std::string &name) const =0 |
| virtual Graph * | getDescendantGraph (unsigned int id) const =0 |
| virtual Graph * | getDescendantGraph (const std::string &name) const =0 |
| virtual node | addNode ()=0 |
| virtual void | addNodes (unsigned int nbNodes, std::vector< node > &addedNodes)=0 |
| virtual void | addNode (const node)=0 |
| virtual void | addNodes (Iterator< node > *nodes)=0 |
| virtual void | delNode (const node n, bool deleteInAllGraphs=false)=0 |
| virtual void | delNodes (Iterator< node > *itN, bool deleteInAllGraphs=false)=0 |
| virtual edge | addEdge (const node, const node)=0 |
| virtual void | addEdges (const std::vector< std::pair< node, node > > &edges, std::vector< edge > &addedEdges)=0 |
| virtual void | addEdge (const edge)=0 |
| virtual void | addEdges (Iterator< edge > *edges)=0 |
| virtual void | delEdge (const edge e, bool deleteInAllGraphs=false)=0 |
| virtual void | delEdges (Iterator< edge > *itE, bool deleteInAllGraphs=false)=0 |
| virtual void | setEdgeOrder (const node, const std::vector< edge > &)=0 |
| virtual void | swapEdgeOrder (const node, const edge, const edge)=0 |
| virtual void | setSource (const edge, const node)=0 |
| | Sets the source of an existing edge.
|
| virtual void | setTarget (const edge, const node)=0 |
| | Sets the target of an existing edge.
|
| virtual void | setEnds (const edge, const node source, const node target)=0 |
| | Sets both the source and target of an existing edge.
|
| virtual void | reverse (const edge)=0 |
| virtual void | reserveNodes (unsigned int nbNodes)=0 |
| virtual void | reserveEdges (unsigned int nbEdges)=0 |
| virtual tlp::node | getSource () const |
| | Finds the first node whose input degree equals 0.
|
| virtual node | getOneNode () const =0 |
| | Returns an existing node of the graph.
|
| virtual Iterator< node > * | getNodes () const =0 |
| | Returns an iterator on the nodes.
|
| virtual node | getInNode (const node, unsigned int) const =0 |
| | Returns the ith predecessor of a node.
|
| virtual Iterator< node > * | getInNodes (const node) const =0 |
| | Returns an iterator on the predecessors of a node.
|
| virtual node | getOutNode (const node, unsigned int) const =0 |
| | Returns the ith successor of a node.
|
| virtual Iterator< node > * | getOutNodes (const node) const =0 |
| | Returns an iterator on the successors of a node.
|
| virtual Iterator< node > * | getInOutNodes (const node) const =0 |
| | Returns an iterator on the neighbours of a node.
|
| virtual Graph * | getNodeMetaInfo (const node) const =0 |
| | Returns the underlying graph of a meta node.
|
| virtual Iterator< edge > * | getEdges () const =0 |
| | Returns an iterator on the edges.
|
| virtual edge | getOneEdge () const =0 |
| | Returns an existing edge of the graph.
|
| virtual Iterator< edge > * | getOutEdges (const node) const =0 |
| | Returns an iterator on the outgoing edges of a node.
|
| virtual Iterator< edge > * | getInOutEdges (const node) const =0 |
| | Returns an iterator on the incoming and outgoing edges of a node.
|
| virtual Iterator< edge > * | getInEdges (const node) const =0 |
| | Returns an iterator on the incoming edges of a node.
|
| virtual Iterator< edge > * | getEdgeMetaInfo (const edge) const =0 |
| | Returns an iterator on the underlying edges of a meta edge.
|
| unsigned int | getId () const |
| | Returns the graph's id. This id is unique.
|
| virtual unsigned int | numberOfNodes () const =0 |
| | Returns the number of nodes in the graph.
|
| virtual unsigned int | numberOfEdges () const =0 |
| | Returns the number of edges in the graph.
|
| virtual unsigned int | deg (const node) const =0 |
| | Returns the degree of a node.
|
| virtual unsigned int | indeg (const node) const =0 |
| | Returns the incoming degree of a node.
|
| virtual unsigned int | outdeg (const node) const =0 |
| | Returns the outgoing degree of a node.
|
| virtual node | source (const edge) const =0 |
| | Returns the source of the edge.
|
| virtual node | target (const edge) const =0 |
| | Returns the target of the edge.
|
virtual const std::pair< node,
node > & | ends (const edge) const =0 |
| virtual node | opposite (const edge, const node) const =0 |
| | Returns the opposite node for n in the edge e.
|
| virtual bool | isElement (const node) const =0 |
| | Returns true if the node is an element of the graph.
|
| virtual bool | isMetaNode (const node) const =0 |
| | Returns true if the node is a meta node.
|
| virtual bool | isElement (const edge) const =0 |
| | Returns true if the edge is an element of the graph.
|
| virtual bool | isMetaEdge (const edge) const =0 |
| | Returns true if the edge is a meta edge.
|
| virtual edge | existEdge (const node source, const node target, bool directed=true) const =0 |
| const DataSet & | getAttributes () const |
| | Returns graph attributes.
|
| template<typename ATTRIBUTETYPE > |
| bool | getAttribute (const std::string &name, ATTRIBUTETYPE &value) const |
| template<typename ATTRIBUTETYPE > |
| _DEPRECATED ATTRIBUTETYPE | getAttribute (const std::string &name) const |
| | Deprecated version of the previous method.
|
| DataType * | getAttribute (const std::string &name) const |
| | Untyped accessor returning a copy.
|
| template<typename ATTRIBUTETYPE > |
| void | setAttribute (const std::string &name, const ATTRIBUTETYPE &value) |
| | Sets an attribute of the graph.
|
| void | setAttribute (const std::string &name, const DataType *value) |
| | Sets attritute from an untyped value.
|
| void | removeAttribute (const std::string &name) |
| | Removes an existing attribute.
|
| bool | attributeExist (const std::string &name) |
| | Returns if the attribute exist.
|
| virtual void | addLocalProperty (const std::string &name, PropertyInterface *prop)=0 |
| template<typename PropertyType > |
| PropertyType * | getLocalProperty (const std::string &name) |
| PropertyInterface * | getLocalProperty (const std::string &propertyName, const std::string &propertyType) |
| bool | applyPropertyAlgorithm (const std::string &algorithm, PropertyInterface *result, std::string &msg, PluginProgress *progress=NULL, DataSet *data=NULL) |
| template<typename PropertyType > |
| bool | computeProperty (const std::string &algorithm, PropertyType *result, std::string &msg, PluginProgress *progress=NULL, DataSet *data=NULL) |
| template<typename PropertyType > |
| PropertyType * | getProperty (const std::string &name) |
| virtual PropertyInterface * | getProperty (const std::string &name) const =0 |
| PropertyInterface * | getProperty (const std::string &propertyName, const std::string &propertyType) |
| virtual bool | existProperty (const std::string &name) const =0 |
| virtual bool | existLocalProperty (const std::string &name) const =0 |
| virtual void | delLocalProperty (const std::string &name)=0 |
| virtual Iterator< std::string > * | getLocalProperties () const =0 |
| virtual Iterator< std::string > * | getInheritedProperties () const =0 |
| virtual Iterator< std::string > * | getProperties () const =0 |
virtual Iterator
< PropertyInterface * > * | getLocalObjectProperties () const =0 |
virtual Iterator
< PropertyInterface * > * | getInheritedObjectProperties () const =0 |
virtual Iterator
< PropertyInterface * > * | getObjectProperties () const =0 |
| void | addGraphObserver (GraphObserver *) const |
| unsigned int | countGraphObservers () const |
| void | removeGraphObserver (GraphObserver *) const |
| virtual void | push (bool unpopAllowed=true, std::vector< PropertyInterface * > *propertiesToPreserveOnPop=NULL)=0 |
| virtual void | pop (bool unpopAllowed=true)=0 |
| virtual void | unpop ()=0 |
| virtual bool | canPop ()=0 |
| virtual bool | canUnpop ()=0 |
| virtual bool | canPopThenUnpop ()=0 |
| node | createMetaNode (const std::set< node > &nodeSet, bool multiEdges=true, bool delAllEdge=true) |
| void | createMetaNodes (Iterator< Graph * > *itS, Graph *quotientGraph, std::vector< node > &metaNodes) |
| node | createMetaNode (Graph *subGraph, bool multiEdges=true, bool delAllEdge=true) |
| void | openMetaNode (node n, bool updateProperties=true) |
| virtual Graph * | getNthSubGraph (unsigned int n) const |
| virtual unsigned int | numberOfSubGraphs () const =0 |
| virtual unsigned int | numberOfDescendantGraphs () const =0 |
| virtual void | setName (const std::string &name)=0 |
| virtual std::string | getName () const =0 |
| | Observable () |
| _DEPRECATED | Observable (bool) |
| virtual | ~Observable () |
| tlp::Iterator< Observable * > * | getOnlookers () const |
| | return an Iterator on all Onlookers
|
| tlp::Iterator< Observable * > * | getObservables () const |
| virtual void | treatEvents (const std::vector< Event > &events) |
| virtual void _DEPRECATED | update (std::set< Observable * >::iterator, std::set< Observable * >::iterator) |
| virtual void _DEPRECATED | observableDestroyed (Observable *) |
| virtual void | treatEvent (const Event &) |
| void | addObserver (Observable *const obs) const |
| | use for old observer tulip compatibility
|
| void | addListener (Observable *const obs) const |
| | use for old observer tulip compatibility
|
| void | removeOnlooker (const Observable &, OLOEDGETYPE type) const |
| | remove an Observer/Listener of the observable
|
| void | removeObserver (Observable *const obs) const |
| | use for old observer tulip compatibility
|
| void | removeListener (Observable *const obs) const |
| void _DEPRECATED | notifyObservers () |
| | use for old observer tulip compatibility
|
| unsigned int | countObservers () const |
| unsigned int | countOnLookers () const |
| unsigned int | countListeners () const |
| bool | hasOnlookers () const |
| | remove all Observer/Listener of the observable
|
| tlp::node | getNode () const |
| | return the node representing that OLOObject in the OLOGraph
|
| unsigned int | getSent () const |
| | return the number of sent nofication
|
| unsigned int | getReceived () const |
| | return the number of received nofication
|
Protected Member Functions |
| virtual DataSet & | getNonConstAttributes ()=0 |
| virtual node | restoreNode (node)=0 |
| virtual void | restoreNodes (const std::vector< node > &nodes)=0 |
| virtual edge | restoreEdge (edge, node source, node target)=0 |
| virtual void | restoreEdges (const std::vector< edge > &edges, const std::vector< std::pair< node, node > > &ends)=0 |
| virtual void | removeNode (const node)=0 |
| virtual void | removeEdge (const edge)=0 |
| virtual bool | canDeleteProperty (Graph *g, PropertyInterface *prop) |
| virtual void | removeSubGraph (Graph *)=0 |
| virtual void | clearSubGraphs ()=0 |
| virtual void | restoreSubGraph (Graph *)=0 |
| virtual void | setSubGraphToKeep (Graph *)=0 |
| void | notifyAddNode (const node n) |
| void | notifyAddNode (Graph *, const node n) |
| void | notifyAddEdge (const edge e) |
| void | notifyAddEdge (Graph *, const edge e) |
| void | notifyBeforeSetEnds (const edge e) |
| void | notifyBeforeSetEnds (Graph *, const edge e) |
| void | notifyAfterSetEnds (const edge e) |
| void | notifyAfterSetEnds (Graph *, const edge e) |
| void | notifyDelNode (const node n) |
| void | notifyDelNode (Graph *, const node n) |
| void | notifyDelEdge (const edge e) |
| void | notifyDelEdge (Graph *, const edge e) |
| void | notifyReverseEdge (const edge e) |
| void | notifyReverseEdge (Graph *, const edge e) |
| void | notifyAddSubGraph (const Graph *) |
| void | notifyAddSubGraph (Graph *, const Graph *sg) |
| void | notifyDelSubGraph (const Graph *) |
| void | notifyDelSubGraph (Graph *, const Graph *sg) |
| void | notifyAddLocalProperty (const std::string &) |
| void | notifyAddLocalProperty (Graph *, const std::string &name) |
| void | notifyBeforeDelLocalProperty (const std::string &) |
| void | notifyAfterDelLocalProperty (const std::string &) |
| void | notifyDelLocalProperty (Graph *, const std::string &name) |
| void | notifyBeforeSetAttribute (const std::string &) |
| void | notifyBeforeSetAttribute (Graph *, const std::string &name) |
| void | notifyAfterSetAttribute (const std::string &) |
| void | notifyAfterSetAttribute (Graph *, const std::string &name) |
| void | notifyRemoveAttribute (const std::string &) |
| void | notifyRemoveAttribute (Graph *, const std::string &name) |
| void | notifyDestroy () |
| | use for old observer tulip compatibility
|
| void | notifyDestroy (Graph *) |
| void | addOnlooker (const Observable &, OLOEDGETYPE type) const |
| | add an Observer/Listener to the observable
|
| void | sendEvent (const Event &) |
| | Enable to send an event to all Observer/Listener.
|
| void | observableDeleted () |
| | Enable to send Event::DELETE before the deletion of subclass internal objects.
|
| | OLOObject () |
| | OLOObject (const OLOObject &) |
| virtual | ~OLOObject () |
| OLOObject & | operator= (const OLOObject &) |
| tlp::Iterator< tlp::node > * | getInObjects () const |
| | return an iterator on in objects (Observable), the iterator guarantee that all objects are alive (not deleted during hold or notify)
|
| tlp::Iterator< tlp::node > * | getOutObjects () const |
| | return an iterator on out objects (Listener/Observer), the iterator garantee that all objects are alive (not deleted during hold or notify)
|