Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.Graphs.Graph Class Reference

Detailed Description

Base graph implementation logic.

Inheritance diagram for Doloro.Graphs.Graph:
Collaboration diagram for Doloro.Graphs.Graph:

Classes

class  RegistryOperationRevertException
 Exception operation that could cause registry operation revert, if supported. More...
 

Public Member Functions

delegate void GraphsRegistryChangeHandler (Graph oldEntry, Graph newEntry)
 Delegate for an agent that handles. More...
 
 Graph ()
 Creates standalone graph without outside connections.
 
virtual Vector3 GetNodePosition (GraphNode node)
 Returns the node's point suggested by the graph logic. More...
 
virtual void SetNodePosition (GraphNode node, Vector3 position)
 Defines world position for the certain graph node. More...
 
virtual GraphNode Add ()
 Adds new GraphNode to the graph. More...
 
virtual T Add< T > ()
 Adds new node to the graph. More...
 
virtual T Add< T > (string signature)
 Adds new node to the graph. More...
 
void Add (string signature)
 Creates new GraphNode. More...
 
void Add (string signature, out GraphNode node)
 Creates new GraphNode. More...
 
virtual void Add (GraphNode node)
 Adds new node to the graph. More...
 
virtual bool Remove (GraphNode node)
 Removing node from the graph. More...
 
virtual bool Contains (string nodeSignature)
 Checks is the node included to the graph. More...
 
virtual bool Contains (GraphNode node)
 Checks is the node included to the graph. More...
 
virtual bool Remove (string signature)
 Removing node from the graph. More...
 
virtual bool TryGetNode (string signature, out GraphNode node)
 Tries to get graph`s node by the signature. More...
 
Connection GetConnection (Guid connectionId)
 Returns descriptor for the Connection by id. More...
 
virtual void GetObjectData (SerializationInfo info, StreamingContext context)
 
override string ToString ()
 Returns graph info. More...
 
void Clear ()
 Clears entire graph from nodes.
 
void CopyTo (GraphNode[] array, int arrayIndex)
 Copies graph nodes of the graph to array. More...
 
void CopyTo (string[] array, int arrayIndex)
 Copies GraphNode.signature entries in graph to array. More...
 
virtual IEnumerator< GraphNodeGetEnumerator ()
 Enumerates nodes withing the graph. More...
 

Protected Member Functions

void OnBinaryDataLoaded ()
 Must be called within ctor(SerializationInfo info, StreamingContext context) after binary data deserialization.
 

Package Functions

 Graph (SerializationInfo info, StreamingContext context)
 
void ReleaseConnection (Guid id)
 Releases connection from internal registry. More...
 
void SetConnectionInfo (Connection connection)
 Adds connection info to the registry. More...
 

Properties

Guid id [get]
 Id of the graph into internal runtime registry.
 
int Count [get]
 Count of nodes into the graph.
 
int ConnectionsCount [get]
 Count of currently established connections into the graph.
 
GraphNode this[string signature] [get]
 
Dictionary< string, GraphNodenodes [get]
 Graph navigation map. More...
 
bool IsReadOnly [get]
 Always false.
 

Events

Action< GraphNodeNodeAdded
 Occurs when new node added to the graph via the API.
 
Action< GraphNodeNodeRemoved
 Occurs when new node removed from the graph via the API.
 
static GraphsRegistryChangeHandler GraphObsoleted
 Occurs when registry overridden with a new graph with id that already has been registered. More...
 

Member Function Documentation

◆ Add() [1/4]

virtual GraphNode Doloro.Graphs.Graph.Add ( )
virtual

Adds new GraphNode to the graph.

Returns
Node instance.

◆ Add() [2/4]

virtual void Doloro.Graphs.Graph.Add ( GraphNode  node)
virtual

Adds new node to the graph.

Parameters
nodeNode to add.

Reimplemented in Doloro.Graphs.Fragmented.GraphsNetwork.

◆ Add() [3/4]

void Doloro.Graphs.Graph.Add ( string  signature)

Creates new GraphNode.

Parameters
signatureNode signature.

◆ Add() [4/4]

void Doloro.Graphs.Graph.Add ( string  signature,
out GraphNode  node 
)

Creates new GraphNode.

Parameters
signatureNode signature.
nodeCreated instance.

◆ Add< T >() [1/2]

virtual T Doloro.Graphs.Graph.Add< T > ( )
virtual

Adds new node to the graph.

Template Parameters
TType of node to add.
Returns
Node instance.
Type Constraints
T :GraphNode 
T :new() 

◆ Add< T >() [2/2]

virtual T Doloro.Graphs.Graph.Add< T > ( string  signature)
virtual

Adds new node to the graph.

Template Parameters
TType of node to add.
Parameters
signatureNode signature.
Returns
Node instance.
Type Constraints
T :GraphNode 

◆ Contains() [1/2]

virtual bool Doloro.Graphs.Graph.Contains ( GraphNode  node)
virtual

Checks is the node included to the graph.

Parameters
nodeNode to check.
Returns
Including status.

Reimplemented in Doloro.Graphs.Fragmented.GraphsNetwork.

◆ Contains() [2/2]

virtual bool Doloro.Graphs.Graph.Contains ( string  nodeSignature)
virtual

Checks is the node included to the graph.

Parameters
nodeSignatureGraphNode.signature to search.
Returns
Including status.

Reimplemented in Doloro.Graphs.Fragmented.GraphsNetwork.

◆ CopyTo() [1/2]

void Doloro.Graphs.Graph.CopyTo ( GraphNode[]  array,
int  arrayIndex 
)

Copies graph nodes of the graph to array.

Parameters
arrayDestination array.
arrayIndexStart index at the destination array.

◆ CopyTo() [2/2]

void Doloro.Graphs.Graph.CopyTo ( string[]  array,
int  arrayIndex 
)

Copies GraphNode.signature entries in graph to array.

Parameters
arrayDestination array.
arrayIndexInsertion index at destination array.

◆ GetConnection()

Connection Doloro.Graphs.Graph.GetConnection ( Guid  connectionId)

Returns descriptor for the Connection by id.

Parameters
connectionIdId of the connection.
Returns
Instance of connection.

◆ GetEnumerator()

virtual IEnumerator< GraphNode > Doloro.Graphs.Graph.GetEnumerator ( )
virtual

Enumerates nodes withing the graph.

Returns
Nodes enumerator.

◆ GetNodePosition()

virtual Vector3 Doloro.Graphs.Graph.GetNodePosition ( GraphNode  node)
virtual

Returns the node's point suggested by the graph logic.

Parameters
nodeTarget node.
Returns
World position of the node point.

◆ GraphsRegistryChangeHandler()

delegate void Doloro.Graphs.Graph.GraphsRegistryChangeHandler ( Graph  oldEntry,
Graph  newEntry 
)

Delegate for an agent that handles.

Parameters
oldEntryEntry that excluded from the registry.
newEntryGraph that applied to the registry instead of an old one.

◆ ReleaseConnection()

void Doloro.Graphs.Graph.ReleaseConnection ( Guid  id)
package

Releases connection from internal registry.

Parameters
idConnection.id to release.

◆ Remove() [1/2]

virtual bool Doloro.Graphs.Graph.Remove ( GraphNode  node)
virtual

Removing node from the graph.

Parameters
nodeNode to release.
Returns
Is the node successfully has been removed from the graph.

Reimplemented in Doloro.Graphs.Fragmented.GraphsNetwork.

◆ Remove() [2/2]

virtual bool Doloro.Graphs.Graph.Remove ( string  signature)
virtual

Removing node from the graph.

Parameters
signatureSignature of the node to release.
Returns
Is the node successfully has been removed from the graph.

Reimplemented in Doloro.Graphs.Fragmented.GraphsNetwork.

◆ SetConnectionInfo()

void Doloro.Graphs.Graph.SetConnectionInfo ( Connection  connection)
package

Adds connection info to the registry.

Parameters
connectionConnection to add.

◆ SetNodePosition()

virtual void Doloro.Graphs.Graph.SetNodePosition ( GraphNode  node,
Vector3  position 
)
virtual

Defines world position for the certain graph node.

Parameters
nodeNode to position declare.
positionWorld position related to the node.

◆ ToString()

override string Doloro.Graphs.Graph.ToString ( )

Returns graph info.

Returns
String representation of graph instance.

◆ TryGetNode()

virtual bool Doloro.Graphs.Graph.TryGetNode ( string  signature,
out GraphNode  node 
)
virtual

Tries to get graph`s node by the signature.

Parameters
signatureGraphNode.signature as access key.
nodeNode instance if found.
Returns
Search result.

Property Documentation

◆ nodes

Dictionary<string, GraphNode> Doloro.Graphs.Graph.nodes
getpackage

Graph navigation map.

string - GraphNode.signature <see cref="GraphNode"/> - node instance.

Event Documentation

◆ GraphObsoleted

GraphsRegistryChangeHandler Doloro.Graphs.Graph.GraphObsoleted
static

Occurs when registry overridden with a new graph with id that already has been registered.

Could occur when you loading the graph that has been loaded up to the moment from the binary data.


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