====== Graph Explorer Plugin ======
Following the basics of the Graph Explorer plugin which holds GraphObjects and SecGraphs, are described.
===== Objects =====
==== GraphObject ====
A GraphObject can be used to load graph structures from file into the GraphObeject explorer and use them as read only assets. The graph structure can either be cloned and then added to the graph or only an instance of it can be used in the graph.
==== SecGraph ====
A SecGraph object extends the GraphObject to creates a fully functional secondary graph, that can be manipulated and is stored in the same XML format as the project graph. Besides the importing inhered from the GraphObject, a SecGraph can be created using a production similar to an instantiation rule:
SecGraphRef x = new SecGraphRef("hi");
x ==> F F A;
To interact with the SecGraph object through RGG or XL, the function setCurrent and releaseCurrent are implemented. These functions change the currently used lock and RGGGraph in GroIMP, allowing to execute code on another graph. Additionally it is possible to push a howl RGG function to a SecGraph.
On the GUI level it is possible to edit the secondary graph on the 2d graph and the 3d view.
===== UI =====
The plugin creates
===== Class relationships =====
The objects follow the structure of references commonly used in GroIMP, therefore the functionalities of are implemented interfaces (SecGraph, GraphObject) which then are implemented each by an implementation that holds the "real" function as a Reference class that can be accessed an used the reslove() function to forward the function calls to the *impl class.
scale 600 width
@startuml
Class ShareableBase
Interface Selectable {
toSelection()
}
Interface RegistryContext {
getRegistry()
}
Interface GraphObject {
getGraph()
getRootNode()
cloneGraph()
toInstance()
toNode()
}
Class GraphObjectImpl{
GraphManager gm
}
Class GraphObjectRef {
GraphObjectImpl resolve()
}
Class SecGraphInitialProducer
Interface SecGraph {
getInitalProducer()
setCurrent()
releaseCurrent()
clear()
runRGG(String func)
}
Class SecGraphImpl {
GraphManager gm
show()
show2d()
}
Class SecGraphRef {
SecGraphImpl resolve()
}
RegistryContext <|-- GraphObject
GraphObject <|-- SecGraph
GraphObject <|..GraphObjectImpl
ShareableBase <|-- GraphObjectImpl
GraphObject <|..GraphObjectRef
ItemReference <|-- GraphObjectRef
GraphObjectImpl --o GraphObjectRef
SecGraph <|.. SecGraphImpl
ShareableBase <|-- SecGraphImpl
SecGraph <|.. SecGraphRef
ItemReference <|-- SecGraphRef
SecGraphImpl --o SecGraphRef
SecGraphImpl <|.. Selectable
SecGraphInitialProducer --* SecGraphImpl
@enduml