[asterisk-scf-commits] asterisk-scf/integration/util-cpp.git branch "route_replica" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed May 4 12:31:24 CDT 2011


branch "route_replica" has been updated
       via  cd4df83103a7f3a80499099343a424c854033b47 (commit)
      from  727e3b6512259c41a5d054d82afe475d388b78d7 (commit)

Summary of changes:
 .../AsteriskSCF/StateMachine/SimpleStateMachine.h  |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit cd4df83103a7f3a80499099343a424c854033b47
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Wed May 4 12:31:00 2011 -0500

    Added resetStartState method.

diff --git a/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h b/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h
index dc6d248..9575be0 100644
--- a/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h
+++ b/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h
@@ -120,6 +120,7 @@ public:
 
     /** 
      * Sets the next state. State transitions occur after the current state's execution is complete. 
+     * This operation is typicall called by the state machine's state handlers. 
      */
     void setNextState(S state)
     {
@@ -182,6 +183,17 @@ public:
         }
     }
 
+    /**
+     * This is used to set the start state. This should only be used if the
+     * start state passed into the constuctor should be reset 
+     * prior to executing the state machine.
+     *  @see setNextState
+     */
+    void resetStartState(S state)
+    {
+        mCurrentState = state;
+    }
+
 private: 
 
     /**

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/util-cpp.git



More information about the asterisk-scf-commits mailing list