groimp-platform:graphexplorerstructure
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
groimp-platform:graphexplorerstructure [2024/11/08 10:53] – tim | groimp-platform:graphexplorerstructure [2024/11/26 13:00] (current) – [SecGraph] tim | ||
---|---|---|---|
Line 7: | Line 7: | ||
==== GraphObject ==== | ==== GraphObject ==== | ||
- | The GraphObject | + | A GraphObject can be used to load graph structures from file into the GraphObeject |
- | The usage of an own GraphManager results | + | A GraphObject is stored |
+ | <code java> | ||
+ | GraphObjectRef gr = new GraphObjectRef(" | ||
+ | [ | ||
+ | A ==> gr.cloneGraph(); | ||
+ | B ==> gr; // replaces B with an instantiation of the graph | ||
+ | ] | ||
+ | |||
+ | </ | ||
==== SecGraph ==== | ==== 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. | ||
+ | Similar to the ObjectGraph a SecGraph can be used through the SecGraphRef class, either by importing (through the SecGraphExplorer) or by creating in RGG. | ||
+ | <code java> | ||
+ | SecGraphRef sgr = new SecGraphRef(" | ||
+ | sgr ==> F RL(30)F; // add a graph structure to the empty secGraph | ||
+ | |||
+ | SecGraphRef sgr = new SecGraphRef(" | ||
+ | |||
+ | SecGraphRef sgr = new SecGraphRef(" | ||
+ | |||
+ | </ | ||
+ | |||
+ | Additionally a SecGraph can also be an attribute of a Node (including the rgg classes). In this case the xml file containing the graph is automatically created using the EmbeddedSharedObject-conzept. | ||
+ | |||
+ | <code java> | ||
+ | |||
+ | module A (float len) { | ||
+ | SecGraphImpl sg; | ||
+ | { | ||
+ | sg = new SecGraphImpl(workbench()); | ||
+ | sg ==> F F RL F; | ||
+ | } | ||
+ | }==> sg; | ||
+ | |||
+ | </ | ||
+ | |||
+ | 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 apply a entire RGG function on a SecGraph. | ||
+ | On the GUI level it is possible to edit the secondary graph on the 2d graph and the 3d view. | ||
+ | |||
===== UI ===== | ===== UI ===== | ||
Line 23: | Line 60: | ||
<uml> | <uml> | ||
- | scale 600 width | + | scale 700 width |
- | @startuml | + | |
Class ShareableBase | Class ShareableBase | ||
Interface Selectable { | Interface Selectable { | ||
toSelection() | toSelection() | ||
} | } | ||
- | Interface | + | Interface |
- | getRegistry() | + | Object clone() |
} | } | ||
- | Interface | + | Interface |
- | getGraph() | + | 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{ | Class GraphObjectImpl{ | ||
GraphManager gm | GraphManager gm | ||
Line 43: | Line 110: | ||
Class GraphObjectRef { | Class GraphObjectRef { | ||
GraphObjectImpl resolve() | GraphObjectImpl resolve() | ||
- | } | ||
- | |||
- | Class SecGraphInitialProducer | ||
- | |||
- | Interface SecGraph { | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
} | } | ||
Class SecGraphImpl { | Class SecGraphImpl { | ||
GraphManager gm | GraphManager gm | ||
- | show() | ||
- | show2d() | ||
} | } | ||
Class SecGraphRef { | Class SecGraphRef { | ||
Line 63: | Line 118: | ||
} | } | ||
+ | GraphContext <|-- GraphManagerContext | ||
+ | GraphManagerContext <|-- GraphObject | ||
RegistryContext <|-- GraphObject | RegistryContext <|-- GraphObject | ||
+ | ProducingNode <|-- GraphObject | ||
GraphObject <|-- SecGraph | GraphObject <|-- SecGraph | ||
+ | |||
+ | Cloneable <|-- SecGraph | ||
GraphObject < | GraphObject < | ||
Line 71: | Line 131: | ||
GraphObject < | GraphObject < | ||
ItemReference <|-- GraphObjectRef | ItemReference <|-- GraphObjectRef | ||
+ | GraphObjectImpl <|.. Selectable | ||
- | GraphObjectImpl --o GraphObjectRef | ||
- | |||
- | SecGraph <|.. SecGraphImpl | ||
- | ShareableBase <|-- SecGraphImpl | ||
SecGraph <|.. SecGraphRef | SecGraph <|.. SecGraphRef | ||
Line 83: | Line 140: | ||
SecGraphImpl <|.. Selectable | SecGraphImpl <|.. Selectable | ||
- | SecGraphInitialProducer | + | SecGraph <|.. SecGraphImpl |
+ | ShareableBase <|-- EmbeddedSharedObject | ||
+ | DisposableField < | ||
+ | EmbeddedSharedObject <|-- SecGraphImpl | ||
- | @enduml | + | SecGraphInitialProducer --* SecGraphImpl |
+ | GraphObjectImpl --o GraphObjectRef | ||
</ | </ |
groimp-platform/graphexplorerstructure.1731059625.txt.gz · Last modified: 2024/11/08 10:53 by tim