User Tools

Site Tools


groimp-platform:graphexplorerstructure

This is an old revision of the document!


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 700 width
Class ShareableBase
Interface Selectable {
toSelection()
}
Interface Cloneable{
Object clone()
}
Interface ProducingNode{
Node produceNode()
}

Interface RegistryContext{
Registry getRegistry()
}

Interface GraphContext{
Graph getGraph()
}

Interface GraphManagerContext{
GraphManager getGraph()
}

Interface DisposableField
Interface GraphObject{
Node getRootNode()
Node cloneGraph()
GraphObject resolve()
view3d(Context ctx)
view2d(Context ctx)
String getName()
}

Interface SecGraph{
clear()
apply(String name)
applyXL(String query)
setAutoRecreate(boolean b)
Object getInitalProducer()
setCurrent()
releaseCurrent()
add(GraphContext sg)
}

Class GraphObjectImpl{
GraphManager gm
}
Class GraphObjectRef {
GraphObjectImpl resolve()
}
Class SecGraphImpl {
GraphManager gm
}
Class SecGraphRef {
SecGraphImpl resolve()
}

GraphContext <|-- GraphManagerContext
GraphManagerContext <|-- GraphObject
RegistryContext <|-- GraphObject
ProducingNode <|-- GraphObject
GraphObject <|-- SecGraph

Cloneable <|-- SecGraph

GraphObject <|..GraphObjectImpl
ShareableBase <|-- GraphObjectImpl

GraphObject <|..GraphObjectRef
ItemReference <|-- GraphObjectRef
GraphObjectImpl <|.. Selectable


SecGraph <|.. SecGraphRef
ItemReference <|-- SecGraphRef

SecGraphImpl --o SecGraphRef
SecGraphImpl <|.. Selectable

SecGraph <|.. SecGraphImpl
ShareableBase <|-- EmbeddedSharedObject
DisposableField <|..EmbeddedSharedObject
EmbeddedSharedObject <|-- SecGraphImpl


SecGraphInitialProducer --* SecGraphImpl
GraphObjectImpl --o GraphObjectRef

groimp-platform/graphexplorerstructure.1732550139.txt.gz · Last modified: 2024/11/25 16:55 by tim