[asterisk-scf-commits] asterisk-scf/release/util-cpp.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Apr 25 14:26:00 CDT 2011


branch "master" has been updated
       via  8f69dc4c01a2fe68b8a6e32a7da9b5b6cc42fec2 (commit)
       via  ba171d9e8fa0a15a43dd11400dbb150a9ce53c40 (commit)
      from  91910645e053e30209cac7dd747117da34b813ed (commit)

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


- Log -----------------------------------------------------------------
commit 8f69dc4c01a2fe68b8a6e32a7da9b5b6cc42fec2
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Mon Apr 25 14:24:11 2011 -0500

    Resolved gcc compilation problems.

diff --git a/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h b/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h
index f6cbe88..dc6d248 100644
--- a/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h
+++ b/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h
@@ -98,7 +98,7 @@ public:
         mListeners.erase(std::remove(mListeners.begin(), mListeners.end(), listener), mListeners.end());
     }
 
-    int getNumListeners()
+    size_t getNumListeners()
     {
         return mListeners.size();
     }
@@ -113,7 +113,7 @@ public:
         mStates[state] = handler;
     }
 
-    int getNumStates()
+    size_t getNumStates()
     {
         return mStates.size();
     }
@@ -138,7 +138,8 @@ public:
         // Notify all listeners that execution is starting.
         sendExecutionStartNotice(mCurrentState);
 
-        std::map<S, boost::function<void ()> >::iterator it = mStates.find(mCurrentState);
+        typename std::map< S, boost::function< void () > >::iterator it = mStates.find(mCurrentState);
+
         if (it != mStates.end())
         {
             // Execute

commit ba171d9e8fa0a15a43dd11400dbb150a9ce53c40
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Mon Apr 25 11:10:25 2011 -0500

    Corrected shadow template param problem.

diff --git a/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h b/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h
index 58e9a0a..f6cbe88 100644
--- a/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h
+++ b/StateMachine/include/AsteriskSCF/StateMachine/SimpleStateMachine.h
@@ -186,12 +186,12 @@ private:
     /**
      * Functor for forwarding stateExecutionStart() notices.
      */
-    template<typename S> 
+    template<typename T> 
     class ExecutionStartNotice
     {
-        // Types: S - State
+        // Types: T - State
     public:
-        ExecutionStartNotice(S state) : mState(state) {}
+        ExecutionStartNotice(T state) : mState(state) {}
         ~ExecutionStartNotice() {}
         void operator() (boost::shared_ptr<StateMachineListener >& x)
         {
@@ -203,7 +203,7 @@ private:
             {
             }
         }
-        S mState;
+        T mState;
     };
 
     /** 
@@ -218,12 +218,12 @@ private:
     /**
      * Functor for forwarding stateExecutionComplete() notices.
      */
-    template<typename S> 
+    template<typename T> 
     class ExecutionCompleteNotice
     {
-        // Types: S - State
+        // Types: T - State
     public:
-        ExecutionCompleteNotice(S state) : mState(state) {}
+        ExecutionCompleteNotice(T state) : mState(state) {}
         ~ExecutionCompleteNotice() {}
         void operator() (boost::shared_ptr<StateMachineListener >& x)
         {
@@ -235,7 +235,7 @@ private:
             {
             }
         }
-        S mState;
+        T mState;
     };
 
     /** 
@@ -249,12 +249,12 @@ private:
     /**
      * Functor for forwarding stateTransition() notices.
      */
-    template<typename S> 
+    template<typename T> 
     class TransitionNotice
     {
-        // Types: S - State
+        // Types: T - State
     public:
-        TransitionNotice(S oldState, S newState) : mOldState(oldState), mNewState(newState) {}
+        TransitionNotice(T oldState, T newState) : mOldState(oldState), mNewState(newState) {}
         ~TransitionNotice() {}
         void operator() (boost::shared_ptr<StateMachineListener >& x)
         {
@@ -266,8 +266,8 @@ private:
             {
             }
         }
-        S mOldState;
-        S mNewState;
+        T mOldState;
+        T mNewState;
     };
 
     /** 
@@ -281,7 +281,7 @@ private:
     /**
      * Functor for forwarding shutdown() notices.
      */
-    template<typename S> 
+    template<typename T> 
     class ShutdownNotice
     {
         // Types: S - State

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


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



More information about the asterisk-scf-commits mailing list