activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r452016 - in /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util: Math.cpp Math.h
Date Mon, 02 Oct 2006 12:56:31 GMT
Author: tabish
Date: Mon Oct  2 05:56:30 2006
New Revision: 452016

URL: http://svn.apache.org/viewvc?view=rev&rev=452016
Log:
Adding new code for Openwire Support

Added:
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.cpp   (with
props)
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.h   (with
props)

Added: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.cpp?view=auto&rev=452016
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.cpp (added)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.cpp Mon
Oct  2 05:56:30 2006
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "Math.h"
+
+using namespace activemq;
+using namespace activemq::util;
+
+////////////////////////////////////////////////////////////////////////////////
+Math::Math() {}

Propchange: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.h?view=auto&rev=452016
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.h (added)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.h Mon Oct
 2 05:56:30 2006
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_UTIL_MATH_H_
+#define _ACTIVEMQ_UTIL_MATH_H_
+
+namespace activemq{
+namespace util{
+
+    /**
+     * The class <code>Math</code> contains methods for performing basic
+     * numeric operations such as the elementary exponential, logarithm,
+     * square root, and trigonometric functions.
+     */ 
+    class Math
+    {
+    private:
+        
+        Math();
+        virtual ~Math();
+
+    public:
+    
+        /**
+         * Returns the smaller of two <code>short</code> values. That is,
+         * the result the argument closer to the value of
+         * <code>Short::MIN_VALUE</code>.  If the arguments have the same
+         * value, the result is that same value.
+         * @param a - an argument.
+         * @param b - another argument.
+         * @return the smaller of <code>a</code> and <code>b</code>.
+         */
+        static short min( short a, short b ) {
+            return ( a <= b ? a : b );
+        }
+
+        /**
+         * Returns the smaller of two <code>int</code> values. That is,
+         * the result the argument closer to the value of
+         * <code>Integer::MIN_VALUE</code>.  If the arguments have the same
+         * value, the result is that same value.
+         * @param a - an argument.
+         * @param b - another argument.
+         * @return the smaller of <code>a</code> and <code>b</code>.
+         */
+        static int min( int a, int b ) {
+            return ( a <= b ? a : b );
+        }
+        
+        /**
+         * Returns the larger of two <code>short</code> values. That is,
+         * the result the argument closer to the value of
+         * <code>Short::MAX_VALUE</code>.  If the arguments have the same
+         * value, the result is that same value.
+         * @param a - an argument.
+         * @param b - another argument.
+         * @return the larger of <code>a</code> and <code>b</code>.
+         */
+        static short max( short a, short b ) {
+            return ( a >= b ? a : b );
+        }
+
+        /**
+         * Returns the larger of two <code>int</code> values. That is,
+         * the result the argument closer to the value of
+         * <code>Integer::MAX_VALUE</code>.  If the arguments have the same
+         * value, the result is that same value.
+         * @param a - an argument.
+         * @param b - another argument.
+         * @return the larger of <code>a</code> and <code>b</code>.
+         */
+        static int max( int a, int b ) {
+            return ( a >= b ? a : b );
+        }
+        
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_UTIL_MATH_H_*/

Propchange: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Math.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message