-
Notifications
You must be signed in to change notification settings - Fork 0
Node
Node is the class/interface that lies at the heart of this framework.
Provided functions - all take MethodContext and TaskTree as parameters
int execute: execute some code and return an int. Generally int simply gets passed up to be similarly returned by the caller. May also have special meaning if minor data passing to the parent is wanted.
bool validate: determines whether the node is valid for entrance at this time. Generally if it is it will be added to the trace stack of the tasktree that initiated the call to it. Also provides a place to perform some operations between determination of validation and first execution.
bool invalidate: determines whether the node is valid for exit at this time. Generally if it is it will be removed from the trace stack of the tasktree that initiated the call to it. Also provides a place to perform some operations between determination of invalidation and the removal from trace.
Discussions: Initially I made Node a class, with everything else being a subclass of it. Now I consider making it an interface - it has no specific functionality of its own other than requiring certain functions be provided - which is the primary purpose of an interface.