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

Detailed Description

Graph that implements cross graphs connections logic.

Inheritance diagram for Doloro.Graphs.Fragmented.GraphsNetwork:
Collaboration diagram for Doloro.Graphs.Fragmented.GraphsNetwork:

Classes

class  CrossGraphVirtualConnection
 Describes virtual link between two graphs. More...
 
class  RelayGraphNode
 Node of the network that relays to another one real node. More...
 
class  TransferGraphNode
 Node that has no a real implementation and using to connect several real nodes within virtual graph. More...
 

Public Member Functions

 GraphsNetwork ()
 Creates new networks of Graphs.
 
void Connect (AFragmentGraph graph1, AFragmentGraph graph2, Direction direction=Direction.Default)
 Attach one fragment graph to another. More...
 
void Connect (GraphNode graph1node, GraphNode graph2node, Direction direction=Direction.Default)
 Connects two nodes from a different Graphs into the network. More...
 
void Disconnect (GraphNode graph1node, GraphNode graph2node)
 Disconnects two nodes withing the network. More...
 
bool IsConnected (GraphNode from, GraphNode to)
 Checks is the pair of nodes are connected to each other. More...
 
virtual bool Add (Graph graph)
 Adds graph to the network database. More...
 
void Add (AFragmentGraph graph)
 Adds fragment graph to the network along with auto declaring of entire exists Enter nodes. More...
 
virtual bool Remove (Graph graph)
 Removes graph presence from the network along with releasing of entire connections. More...
 
override void Add (GraphNode node)
 Adding outside node to the network. More...
 
override bool Remove (GraphNode node)
 Removes node connected to the network from the network. More...
 
override bool Remove (string nodeSignature)
 Removes node connected to the network from the network. More...
 
override bool Contains (string nodeSignature)
 Checks is the outside node included to the network. More...
 
override bool Contains (GraphNode node)
 Checks is the outside node included to the network. More...
 
Path BuildPath (GraphNode from, Direction escapeDirection, GraphNode to, Direction enteringDirection)
 Attempts to build path from one node to another withing graph network. More...
 
async Task< PathBuildPathAsync (GraphNode from, Direction escapeDirection, GraphNode to, Direction enteringDirection)
 Attempts to build path from one node to another withing graph network asynchronously. More...
 
delegate void GraphsRegistryChangeHandler (Graph oldEntry, Graph newEntry)
 Delegate for an agent that handles. More...
 
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...
 
void Add (string signature)
 Creates new GraphNode. More...
 
void Add (string signature, out GraphNode node)
 Creates new GraphNode. 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...
 
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...
 

Protected Member Functions

virtual bool Add (Graph graph, out(TransferGraphNode selfNode, HashSet< GraphNode > relatedNodes) metadata)
 Adds graph to the network database. More...
 
GraphNode GetRelatedNode (GraphNode source, string title)
 Returns node of the network related to the source node graph. More...
 
void OnBinaryDataLoaded ()
 Must be called within ctor(SerializationInfo info, StreamingContext context) after binary data deserialization.
 

Package Functions

 GraphsNetwork (SerializationInfo info, StreamingContext context)
 Restores object from the binary data. More...
 
void ReleaseConnection (Guid id)
 Releases connection from internal registry. More...
 
void SetConnectionInfo (Connection connection)
 Adds connection info to the registry. More...
 

Properties

int GraphsCount [get]
 Count of unique graphs included to the network.
 
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...
 

Constructor & Destructor Documentation

◆ GraphsNetwork()

Doloro.Graphs.Fragmented.GraphsNetwork.GraphsNetwork ( SerializationInfo  info,
StreamingContext  context 
)
package

Restores object from the binary data.

Parameters
info
context

Member Function Documentation

◆ Add() [1/7]

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

Adds new GraphNode to the graph.

Returns
Node instance.

◆ Add() [2/7]

void Doloro.Graphs.Fragmented.GraphsNetwork.Add ( AFragmentGraph  graph)

Adds fragment graph to the network along with auto declaring of entire exists Enter nodes.

Parameters
graphGraph to add.

◆ Add() [3/7]

virtual bool Doloro.Graphs.Fragmented.GraphsNetwork.Add ( Graph  graph)
virtual

Adds graph to the network database.

Parameters
graphGraph to add.
Returns
true in case if graph has been registered. false if graph has been registered some time before the call.

◆ Add() [4/7]

virtual bool Doloro.Graphs.Fragmented.GraphsNetwork.Add ( Graph  graph,
out(TransferGraphNode selfNode, HashSet< GraphNode > relatedNodes)  metadata 
)
protectedvirtual

Adds graph to the network database.

Parameters
graphGraph to add.
metadataMeta data tuple related to the graph.
Returns
true in case if graph has been registered. false if graph has been registered some time before the call.

◆ Add() [5/7]

override void Doloro.Graphs.Fragmented.GraphsNetwork.Add ( GraphNode  node)
virtual

Adding outside node to the network.

Parameters
nodeNode outside from the network to the network include.
Exceptions
NotSupportedExceptionNode already exist withing the network.

Reimplemented from Doloro.Graphs.Graph.

◆ Add() [6/7]

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

Creates new GraphNode.

Parameters
signatureNode signature.

◆ Add() [7/7]

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

Creates new GraphNode.

Parameters
signatureNode signature.
nodeCreated instance.

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

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

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)
virtualinherited

Adds new node to the graph.

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

◆ BuildPath()

Path Doloro.Graphs.Fragmented.GraphsNetwork.BuildPath ( GraphNode  from,
Direction  escapeDirection,
GraphNode  to,
Direction  enteringDirection 
)

Attempts to build path from one node to another withing graph network.

Parameters
fromOrigin node.
escapeDirectionDirection preferring to leave the origin graph to entering the network space.
toDestination node.
enteringDirectionDirection preferring to enter destination graph.
Returns
Path from one point to another.

◆ BuildPathAsync()

async Task< Path > Doloro.Graphs.Fragmented.GraphsNetwork.BuildPathAsync ( GraphNode  from,
Direction  escapeDirection,
GraphNode  to,
Direction  enteringDirection 
)

Attempts to build path from one node to another withing graph network asynchronously.

Parameters
fromOrigin node.
escapeDirectionDirection preferring to leave the origin graph to entering the network space.
toDestination node.
enteringDirectionDirection preferring to enter destination graph.
Returns
Path from one point to another.

◆ Connect() [1/2]

void Doloro.Graphs.Fragmented.GraphsNetwork.Connect ( AFragmentGraph  graph1,
AFragmentGraph  graph2,
Direction  direction = Direction.Default 
)

Attach one fragment graph to another.

Parameters
graph1First graph.
graph2Second graph.
directionDirection from the first graph to a second one in world space.

◆ Connect() [2/2]

void Doloro.Graphs.Fragmented.GraphsNetwork.Connect ( GraphNode  graph1node,
GraphNode  graph2node,
Direction  direction = Direction.Default 
)

Connects two nodes from a different Graphs into the network.

Parameters
graph1nodeNode from a first graph.
graph2nodeNode from a second graph.
directionConnection direction considered with graph position in 2D space to each other.

◆ Contains() [1/2]

override bool Doloro.Graphs.Fragmented.GraphsNetwork.Contains ( GraphNode  node)
virtual

Checks is the outside node included to the network.

Parameters
nodeNode from outside of the network's raw graph.
Returns
true in case if the node has been included to the network.

Reimplemented from Doloro.Graphs.Graph.

◆ Contains() [2/2]

override bool Doloro.Graphs.Fragmented.GraphsNetwork.Contains ( string  nodeSignature)
virtual

Checks is the outside node included to the network.

Parameters
nodeSignatureGraphNode.signature of the node from outside of the network's raw graph.
Returns
true in case if the node has been included to the network.

Reimplemented from Doloro.Graphs.Graph.

◆ CopyTo() [1/2]

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

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 
)
inherited

Copies GraphNode.signature entries in graph to array.

Parameters
arrayDestination array.
arrayIndexInsertion index at destination array.

◆ Disconnect()

void Doloro.Graphs.Fragmented.GraphsNetwork.Disconnect ( GraphNode  graph1node,
GraphNode  graph2node 
)

Disconnects two nodes withing the network.

Parameters
graph1nodeFirst node of connection.
graph2nodeSecond node of connection.

◆ GetConnection()

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

Returns descriptor for the Connection by id.

Parameters
connectionIdId of the connection.
Returns
Instance of connection.

◆ GetNodePosition()

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

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

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

◆ GetRelatedNode()

GraphNode Doloro.Graphs.Fragmented.GraphsNetwork.GetRelatedNode ( GraphNode  source,
string  title 
)
protected

Returns node of the network related to the source node graph.

Parameters
sourceBode of a graph included to the network.
titleTitle of node to system messages.
Returns
Node instance.
Exceptions
ArgumentExceptionNode is not a part of the network.

◆ GraphsRegistryChangeHandler()

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

Delegate for an agent that handles.

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

◆ IsConnected()

bool Doloro.Graphs.Fragmented.GraphsNetwork.IsConnected ( GraphNode  from,
GraphNode  to 
)

Checks is the pair of nodes are connected to each other.

Parameters
from
to
Returns

◆ ReleaseConnection()

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

Releases connection from internal registry.

Parameters
idConnection.id to release.

◆ Remove() [1/3]

virtual bool Doloro.Graphs.Fragmented.GraphsNetwork.Remove ( Graph  graph)
virtual

Removes graph presence from the network along with releasing of entire connections.

Parameters
graphGraph to release.
Returns
true in case if graph has been released. false in case if graph has been found.

◆ Remove() [2/3]

override bool Doloro.Graphs.Fragmented.GraphsNetwork.Remove ( GraphNode  node)
virtual

Removes node connected to the network from the network.

Parameters
nodeNode to exclude.
Returns
is the node has been excluded from the network.

Not allows to remove node declared by the network itself. Allows access only for user-site nodes.

Reimplemented from Doloro.Graphs.Graph.

◆ Remove() [3/3]

override bool Doloro.Graphs.Fragmented.GraphsNetwork.Remove ( string  nodeSignature)
virtual

Removes node connected to the network from the network.

Parameters
nodeSignatureGraphNode.signature to exclude.
Returns
is the node has been excluded from the network.

Not allows to remove node declared by the network itself. Allows access only for user-site nodes.

Reimplemented from Doloro.Graphs.Graph.

◆ SetConnectionInfo()

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

Adds connection info to the registry.

Parameters
connectionConnection to add.

◆ SetNodePosition()

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

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 ( )
inherited

Returns graph info.

Returns
String representation of graph instance.

◆ TryGetNode()

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

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
getpackageinherited

Graph navigation map.

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

Event Documentation

◆ GraphObsoleted

GraphsRegistryChangeHandler Doloro.Graphs.Graph.GraphObsoleted
staticinherited

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 files: