#if !defined(TRANSITION_H) #define TRANSITION_H #include # if !defined OLC3COMMON_H # include "olc3common.h" # endif /* ** The schema definition for the Transition object */ #if 0 Transition TR /* Transition */ { TRid TransitionId c8 1 /* The primary key */ STid1 TransitionFromThisState c8 1 /* Transition from this state */ STid2 TransitionToThisState c8 1 /* Transition to this state */ } #endif /* ** TransitionCreate: Creates a Transition object ** ** TransitionFromThisState : the key of the state to transition from ** TransitionToThisState : the key of the state to transtion to ** ** Returns the key of the Transition created */ PROTOTYPE(hcg_key TransitionCreate, (hcg_key TransitionFromThisState, hcg_key TransitionToThisState)) /* ** TransitionDelete: Deletes a Transition object ** ** TransitionToDelete : the key of the Transition object to Delete */ PROTOTYPE(void TransitionDelete, (hcg_key TransitionToDelete)) /* ** TransitionFirst: Returns the first Transition object ** TransitionNext: Returns the Transition object following the specified ** transition, 0 otherwise. ** ** These routines offer a way to loop through all existing transitions. ** The routines offer no guarantee as to the order of the transitions, ** only that TransitionFirst followed by TransitionNext until it returns ** 0 will return keys for all the transitions with no key be returned ** more than once. ** */ PROTOTYPE(hcg_key TransitionFirst, (void)) PROTOTYPE(hcg_key TransitionNext, (hcg_key TRid)) /* ** TransitionGetSTid1: Returns the key of the from state in the transition ** TransitionGetSTid2: Returns the key of the to state in the transition ** ** TRid : The transtion object from which to fetch the from/to state */ PROTOTYPE(hcg_key TransitionGetSTid1, (hcg_key TRid)) PROTOTYPE(hcg_key TransitionGetSTid2, (hcg_key TRid)) #endif