-
Notifications
You must be signed in to change notification settings - Fork 8
IEnumStrategy
IEnumStrategy is used to enumirate all nodes/edges in graph. You don't need create own Depth-first search algorithm. You can call IGraph method ProcessDFS(IEnumStrategy* pEnumStrategy, ObjectId startedNode). You should pass your implementation of IEnumStrategy and first node.
-
DefaultEnumStrategy- ProcessDFS supports default enumeration types.
DES_NONE - don't use any default enumeration.
DES_NODE - use enumeration, when each node will process one time. You don't need control enumeration in your IEnumStrategy.
DES_EDGE - use enumeration, when each edge will process one time. You don't need control enumeration in your IEnumStrategy. -
StartProcessNode(ObjectId nodeId)- graph calls this method when start new node. -
NeedProcessChild(ObjectId nodeId, ObjectId childId, ObjectId edgeId)- return true if graph needs to process childId node from childId using edgeId. -
FinishProcessNode(ObjectId nodeId)- calls when we finish process current node and all them children. -
GetDefaultStrategy()- return default enumeraion type DefaultEnumStrategy. -
StartProcessEdge(ObjectId edgeId)- start process new edge. -
FinishProcessEdge(ObjectId edgeId)- finish process edge and all nodes which were connected with parent node using edgeId.