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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Apr 4 09:49:21 CDT 2012


branch "retry_deux" has been updated
       via  c1aee7ef1cdb3dbab3d4aacf89a5fbd11a89972e (commit)
      from  46d8699b2aeffd90a51ee7c50e3e2fcd3832fba9 (commit)

Summary of changes:
 include/AsteriskSCF/Operations/ExceptionWrapper.h |  220 ++++++++++----------
 include/AsteriskSCF/Operations/OperationMonitor.h |   38 ++--
 src/Operations/OperationMonitor.cpp               |    2 +-
 3 files changed, 130 insertions(+), 130 deletions(-)


- Log -----------------------------------------------------------------
commit c1aee7ef1cdb3dbab3d4aacf89a5fbd11a89972e
Author: David M. Lee <dlee at digium.com>
Date:   Wed Apr 4 09:49:18 2012 -0500

    Fixed copyright year and space issues

diff --git a/include/AsteriskSCF/Operations/ExceptionWrapper.h b/include/AsteriskSCF/Operations/ExceptionWrapper.h
index 84933b0..52d4a43 100755
--- a/include/AsteriskSCF/Operations/ExceptionWrapper.h
+++ b/include/AsteriskSCF/Operations/ExceptionWrapper.h
@@ -1,110 +1,110 @@
-/*
- * Asterisk SCF -- An open-source communications framework.
- *
- * Copyright (C) 2010-2011, Digium, Inc.
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk SCF project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE.txt file
- * at the top of the source tree.
- */
-
-#pragma once
-
-#include <Ice/Exception.h>
-#include <Ice/LocalException.h>
-#include <exception>
-#include <string>
-#include <boost/shared_ptr.hpp>
-#include <AsteriskSCF/Operations/OperationContextCache.h>
-
-namespace AsteriskSCF
-{
-
-namespace Operations
-{
-
-typedef boost::shared_ptr<IceUtil::Exception> ExceptionPtr;
-class ExceptionWrapper;
-typedef boost::shared_ptr<ExceptionWrapper> ExceptionWrapperPtr;
-
-/** 
- * ExceptionWrapper is OperationContextCookie derived class for
- * storing exceptional results for use later on. 
- */
-class ExceptionWrapper
-{
-
-public:
-    /**
-     * Several conversion constructors are provided for
-     * convenience. While conversion constructors can be problematic,
-     * the nature of this class is "to wrap"... so there!
-     */
-    explicit
-    ExceptionWrapper(const IceUtil::Exception& ex) :
-        mException(ex.ice_clone())
-    {
-    }
-
-    /**
-     * Unfortunately std::exception does not provide a way to clone
-     * the most-derived type at runtime. As the ultimate goal is to
-     * send this exception to an Ice client, we need only do as well
-     * as the Ice runtime can -- create an
-     * Ice::UnknownException(). The __FILE__ and __LINE__ will not be
-     * related to the original exception, but does have value in that
-     * it shows where the std::exception->Ice exception translation
-     * occurs.
-     */
-    explicit
-    ExceptionWrapper(const std::exception& ex) :
-        mException(new Ice::UnknownException(__FILE__, __LINE__, ex.what()))
-    {
-    }
-
-    /**
-     * Intended for those catch (...) cases. Something can be passed back,
-     * but like std::exceptions, Ice will end up sending an
-     * UnknownException.
-     */
-    explicit
-    ExceptionWrapper(const std::string& msg) :
-       mException(new Ice::UnknownException(__FILE__, __LINE__, msg))
-    {
-    }
-
-    /**
-     * Accessor to get the wrapped exception.
-     */
-    ExceptionPtr exception() const
-    {
-        return mException;
-    }
-
-    static ExceptionWrapperPtr create(const Ice::Exception& x)
-    {
-        return ExceptionWrapperPtr(new ExceptionWrapper(x));
-    }
-
-    static ExceptionWrapperPtr create(const std::exception& x)
-    {
-        return ExceptionWrapperPtr(new ExceptionWrapper(x));
-    }
-
-    static ExceptionWrapperPtr create(const std::string& msg)
-    {
-        return ExceptionWrapperPtr(new ExceptionWrapper(msg));
-    }
-
-private:
-    ExceptionPtr mException;
-};
-
-} /* end of namespace Operations */
-} /* end of namespace AsteriskSCF */
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2010-2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+#include <Ice/Exception.h>
+#include <Ice/LocalException.h>
+#include <exception>
+#include <string>
+#include <boost/shared_ptr.hpp>
+#include <AsteriskSCF/Operations/OperationContextCache.h>
+
+namespace AsteriskSCF
+{
+
+namespace Operations
+{
+
+typedef boost::shared_ptr<IceUtil::Exception> ExceptionPtr;
+class ExceptionWrapper;
+typedef boost::shared_ptr<ExceptionWrapper> ExceptionWrapperPtr;
+
+/**
+ * ExceptionWrapper is OperationContextCookie derived class for
+ * storing exceptional results for use later on.
+ */
+class ExceptionWrapper
+{
+
+public:
+    /**
+     * Several conversion constructors are provided for
+     * convenience. While conversion constructors can be problematic,
+     * the nature of this class is "to wrap"... so there!
+     */
+    explicit
+    ExceptionWrapper(const IceUtil::Exception& ex) :
+        mException(ex.ice_clone())
+    {
+    }
+
+    /**
+     * Unfortunately std::exception does not provide a way to clone
+     * the most-derived type at runtime. As the ultimate goal is to
+     * send this exception to an Ice client, we need only do as well
+     * as the Ice runtime can -- create an
+     * Ice::UnknownException(). The __FILE__ and __LINE__ will not be
+     * related to the original exception, but does have value in that
+     * it shows where the std::exception->Ice exception translation
+     * occurs.
+     */
+    explicit
+    ExceptionWrapper(const std::exception& ex) :
+        mException(new Ice::UnknownException(__FILE__, __LINE__, ex.what()))
+    {
+    }
+
+    /**
+     * Intended for those catch (...) cases. Something can be passed back,
+     * but like std::exceptions, Ice will end up sending an
+     * UnknownException.
+     */
+    explicit
+    ExceptionWrapper(const std::string& msg) :
+       mException(new Ice::UnknownException(__FILE__, __LINE__, msg))
+    {
+    }
+
+    /**
+     * Accessor to get the wrapped exception.
+     */
+    ExceptionPtr exception() const
+    {
+        return mException;
+    }
+
+    static ExceptionWrapperPtr create(const Ice::Exception& x)
+    {
+        return ExceptionWrapperPtr(new ExceptionWrapper(x));
+    }
+
+    static ExceptionWrapperPtr create(const std::exception& x)
+    {
+        return ExceptionWrapperPtr(new ExceptionWrapper(x));
+    }
+
+    static ExceptionWrapperPtr create(const std::string& msg)
+    {
+        return ExceptionWrapperPtr(new ExceptionWrapper(msg));
+    }
+
+private:
+    ExceptionPtr mException;
+};
+
+} /* end of namespace Operations */
+} /* end of namespace AsteriskSCF */
diff --git a/include/AsteriskSCF/Operations/OperationMonitor.h b/include/AsteriskSCF/Operations/OperationMonitor.h
index 62e7e25..c53c7f9 100755
--- a/include/AsteriskSCF/Operations/OperationMonitor.h
+++ b/include/AsteriskSCF/Operations/OperationMonitor.h
@@ -1,7 +1,7 @@
 /*
  * Asterisk SCF -- An open-source communications framework.
  *
- * Copyright (C) 2010-2011, Digium, Inc.
+ * Copyright (C) 2012, Digium, Inc.
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk SCF project. Please do not directly contact
@@ -31,8 +31,8 @@ namespace Operations
 {
 
 /**
- * The ContextMonitor provides a mechanism for waiting for a result when multiple 
- * upcalls occur for the same OperationContext. Of course this is only relevant for 
+ * The ContextMonitor provides a mechanism for waiting for a result when multiple
+ * upcalls occur for the same OperationContext. Of course this is only relevant for
  * non-AMD implementations.
  */
 class ASTSCF_DLL_EXPORT ContextMonitor : public IceUtil::Shared
@@ -44,7 +44,7 @@ public:
     {
     }
 
-    bool isCompleted() 
+    bool isCompleted()
     {
         IceUtil::Monitor<IceUtil::Mutex>::Lock lock(mMonitor);
         return mCompleted;
@@ -68,7 +68,7 @@ public:
     }
 
     /**
-     * Revisit: this was added before there was a specific use for it. If it is not referenced, 
+     * Revisit: this was added before there was a specific use for it. If it is not referenced,
      * it probably should be removed (along with the related member variable of course).
      */
     void cancel()
@@ -130,10 +130,10 @@ public:
     {
         return mMonitor->waitForResults();
     }
-   
+
 protected:
     IceUtil::Mutex mLock;
-    
+
     ContextMonitorPtr mMonitor;
     ExceptionWrapperPtr mExceptionResult;
 
@@ -153,10 +153,10 @@ public:
 };
 
 /**
- * Template derived class of ContextData.  
+ * Template derived class of ContextData.
  * TODO: comment on rationale. The general idea is that the casting
- * can occur on the context result data, not on what is inside it. 
- * Derived classes are also a bit more interesting because they will 
+ * can occur on the context result data, not on what is inside it.
+ * Derived classes are also a bit more interesting because they will
  * be specific to a certain result type.. but this whole notion needs
  * to be worded better. Hence the TODO.
  */
@@ -184,7 +184,7 @@ public:
             //
             throw CancelledOperationException();
         }
-        
+
         if (mExceptionResult)
         {
             mExceptionResult->exception()->ice_throw();
@@ -204,7 +204,7 @@ ASTSCF_DLL_EXPORT void ContextResultData<RT>::setResult(const RT& val)
     {
         return;
     }
-    
+
     IceUtil::LockT<IceUtil::Mutex> lock(mLock);
     mResult = val;
     setCompleted();
@@ -251,7 +251,7 @@ public:
                 mParent.reset();
             }
         }
-    
+
         void ice_exception()
         {
             if (mParent)
@@ -284,7 +284,7 @@ public:
     CB getProxy()
     {
         {
-            // 
+            //
             // We need to do this lazy initialization because we need to setup the relationship
             // between the AMD proxy and this object instance *after* this object instance
             // has been fully constructed. Otherwise we can get into some nasty stuff.
@@ -393,7 +393,7 @@ public:
                 mParent.reset();
             }
         }
-    
+
         void ice_exception()
         {
             if (mParent)
@@ -427,7 +427,7 @@ public:
     CB getProxy()
     {
         {
-            // 
+            //
             // We need to do this lazy initialization because we need to setup the relationship
             // between the AMD proxy and this object instance *after* this object instance
             // has been fully constructed. Otherwise we can get into some nasty stuff.
@@ -441,7 +441,7 @@ public:
         }
         return mAMDProxy;
     }
-    
+
     void addCB(const CB& cbPtr)
     {
         IceUtil::LockT<IceUtil::Mutex> lock(mLock);
@@ -459,7 +459,7 @@ public:
         }
         mCallbacks.push_back(cbPtr);
     }
-    
+
 private:
     void onSetResult()
     {
@@ -482,7 +482,7 @@ private:
     std::vector<CB> mCallbacks;
 };
 
-/** 
+/**
  * Simple file scope helper for the "add" methods. The signatures for these
  * methods do not include any kind of results, so we only need to consider
  * exceptions and one method will do for all of that. This function is a
diff --git a/src/Operations/OperationMonitor.cpp b/src/Operations/OperationMonitor.cpp
index 3e7dec3..78f6b0e 100755
--- a/src/Operations/OperationMonitor.cpp
+++ b/src/Operations/OperationMonitor.cpp
@@ -1,7 +1,7 @@
 /*
  * Asterisk SCF -- An open-source communications framework.
  *
- * Copyright (C) 2010-2011, Digium, Inc.
+ * Copyright (C) 2012, Digium, Inc.
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk SCF project. Please do not directly contact

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


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



More information about the asterisk-scf-commits mailing list