memoryx::GraphMemorySegmentBase
Overview
[ "cpp:virtual" ]
class GraphMemorySegmentBase extends PersistentEntitySegmentBase
@brief Segment to store graphs represented by GraphNodes.
Operation Index
- getScenes
-
@brief Returns a list containing all used scene names.
- getNodesByScene
-
@brief Returns all nodes assoicated to given scene.
- getNodeById
-
@brief Returns the node with given id.
- getNodeByName
-
@brief Returns the node with given name.
- getAllNodes
-
@brief Returns all nodes.
- clearScene
-
@brief Removes all nodes associated to given scene.
- addNode
-
@brief Adds a node to the segment.
- addEdge
-
@brief Adds an edge between given nodes.
- hasScene
-
@brief Returns whether the scene exists (whether it contains nodes).
- hasNodeWithName
-
@brief Returns whether the requested scene has a node with the requested name.
- getNodeFromSceneByName
-
@brief Returns the node from the requested scene with the requested name.
- removeNode
-
- removeEdge
-
- aStar
-
@brief Searches a path from idFrom to idTo using a*.
Operations
::Ice::StringSeq getScenes()
@brief Returns a list containing all used scene names.
Return Value
A list containing all used scene names.
@brief Returns all nodes assoicated to given scene.
Parameters
- name
-
The name of the scene
Return Value
All nodes assoicated to given scene.
GraphNodeBase getNodeById(string entityId)
@brief Returns the node with given id.
Parameters
- entityId
-
The node's id.
Return Value
The node with given id.
GraphNodeBase getNodeByName(string entityName)
@brief Returns the node with given name.
Parameters
- entityName
-
The node's name.
Return Value
The node with given name.
@brief Returns all nodes.
Return Value
All nodes.
void clearScene(string sceneName)
@brief Removes all nodes associated to given scene.
Parameters
- sceneName
-
The scene to clear.
@brief Adds a node to the segment.
Parameters
- node
-
The node to add.
Return Value
The entity id.
bool addEdge(string fromId, string toId)
@brief Adds an edge between given nodes.
Parameters
- fromId
-
The source node's id.
- toId
-
The destination node's id.
Return Value
Whether the node was added.
bool hasScene(string sceneName)
@brief Returns whether the scene exists (whether it contains nodes).
Parameters
- sceneName
-
The scene's name.
Return Value
Whether the scene exists (whether it contains nodes).
bool hasNodeWithName(string sceneName, string nodeName)
@brief Returns whether the requested scene has a node with the requested name.
Parameters
- sceneName
-
The requested scene.
- name
-
The requested node name.
Return Value
Whether the requested scene has a node with the requested name.
GraphNodeBase getNodeFromSceneByName(string sceneName, string nodeName)
@brief Returns the node from the requested scene with the requested name.
Parameters
- sceneName
-
The requested scene.
- name
-
The requested node.
Return Value
The node from the requested scene with the requested name name.
bool removeNode(string nodeId)
bool removeEdge(string startNodeId, string endNodeId)
@brief Searches a path from idFrom to idTo using a*.
http://en.wikipedia.org/wiki/A*_search_algorithm
Parameters
- idFrom
-
The node to use as starting point.
- idTo
-
The target node.
Return Value
The path from idFrom to idTo.