ezEngine  Release 25.03
ezDGMLGraph Class Reference

This class encapsulates building a DGML compatible graph. More...

#include <DGMLWriter.h>

Classes

struct  Connection
 
struct  Node
 
struct  NodeDesc
 
struct  PropertyType
 
struct  PropertyValue
 

Public Types

enum  Direction : ezUInt8 { TopToBottom, BottomToTop, LeftToRight, RightToLeft }
 
enum  Layout : ezUInt8 { Free, Tree, DependencyMatrix }
 
enum  NodeShape : ezUInt8 { None, Rectangle, RoundedRectangle, Button }
 
enum  GroupType : ezUInt8 { None, Expanded, Collapsed }
 
using NodeId = ezUInt32
 
using PropertyId = ezUInt32
 
using ConnectionId = ezUInt32
 

Public Member Functions

 ezDGMLGraph (Direction graphDirection=Direction::LeftToRight, Layout graphLayout=Layout::Tree)
 Constructor for the graph.
 
NodeId AddNode (ezStringView sTitle, const NodeDesc *pDesc=nullptr)
 Adds a node to the graph. Adds a node to the graph and returns the node id which can be used to reference the node later to add connections etc.
 
NodeId AddGroup (ezStringView sTitle, GroupType type, const NodeDesc *pDesc=nullptr)
 Adds a DGML node that can act as a group for other nodes.
 
void AddNodeToGroup (NodeId node, NodeId group)
 Inserts a node into an existing group node.
 
ConnectionId AddConnection (NodeId source, NodeId target, ezStringView sLabel={})
 Adds a directed connection to the graph (an arrow pointing from source to target node).
 
PropertyId AddPropertyType (ezStringView sName)
 Adds a property type. All properties currently use the data type 'string'.
 
void AddNodeProperty (NodeId node, PropertyId property, const ezFormatString &fmt)
 Adds a property of the specified type with the given value to a node.
 

Protected Attributes

ezHybridArray< Node, 16 > m_Nodes
 
ezHybridArray< Connection, 32 > m_Connections
 
ezHybridArray< PropertyType, 16 > m_PropertyTypes
 
Direction m_Direction
 
Layout m_Layout
 

Friends

class ezDGMLGraphWriter
 

Detailed Description

This class encapsulates building a DGML compatible graph.


The documentation for this class was generated from the following files: