rocs/RocsCore
RocsCore provides several concepts to describe data structures and work with them. Further, it provides a scripting interface for run-time access.
Data Structure Concepts
The coarse architecture is that a Document represents the notion of a visual whiteboard where the data structure is placed or the file it is saved in. A document may contain several data structures, which are represented by DataStructure. Finally, a data structure is given by its data elements that are of type Data and its connections that are of type Pointer.
- Document Representation of a whiteboard (as used in the VisualGraphEditor) as well as a graph file as accessed by GraphFileBackendManager. A document can contain an arbitrary number of data structures. If a document contains at least one data structure, it indicates the currently used data structure. A document is always associated to exactly one DataStructureBackend that controls how data elements and pointers can be created and changed withing its data structures.
- DataStructure Notion of a set of data elements and pointers that form an entity (e.g., a graph, a rooted tree, a linked list). Connecting data elements is only possible for elements of the same data structure.
- Data Represents an element of a data structure (e.g., node in a graph, leaf in a tree, element of a linked list). A data element can have an arbitrary set of properties and arbitrary connections to other data elements of the same data structure. A data element is always of one specific DataType.
- Pointer Represents the connection of two data elements. A connection can either be unidirectional or bidirectional and may have arbitrary properties. A connection is always of one specific PointerType.
- DataType Represents a prototype for all data elements of this type. A data type can have predefined properties and allows a direct access to elements of this type as well a uniform visual representation.
- PointerType Represents a prototype for all pointers of this type. A pointer type defines if the pointers of this type are either bidirectional or unidirectional. Further it allows a direct access to pointers of this type as well a uniform visual representation.
- Group Represents the notion of a subgraph, which is an entity formed by a fixed set of data elements. It is possible to connect data elements with groups. (Note: this concept is not yet fully implemented.)
Dynamic Properties of Data Elements and Pointers
Each data element and pointer can have arbitrary properties. Those can either be created directly the the corresponding methods in Data and Pointer, or by registering a property globally for all data elements or pointers of a specific type in the corresponding DataType or PointerType object, respectively.
Data Structure Backends
Backends are controlled by the DataStructureBackendManager. The backend manager searches the $KDEDIRS for all KService plugins that are of type Rocs/DataStructurePlugin
and loads them on demand. It is important that at least one backend must be found since otherwise no Document can be created.
Backends are of type DataStructurePluginInterface and they must provide a unique internal name by the KService property X-Rocs-DataStructureIdentifier
. RocsCore currently ships the following backends:
- Rocs::GraphPlugin This is the default backend that should always be used if no specific graph restrictions shall be enforced.
- Rocs::ListPlugin Represents linked lists, provides convenience methods for lists, and automatic arrangement algorithms.
- Rocs::RootedTreePlugin Represents rooted trees, provides convenience methods for trees, and automatic arrangement algorithms.
For questions and discussions about the application either contact the author or the rocs-devel@kde.org mailing list.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.