activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r560421 - in /activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang: Character.h Integer.h Long.h Short.h
Date Fri, 27 Jul 2007 23:32:38 GMT
Author: tabish
Date: Fri Jul 27 16:32:37 2007
New Revision: 560421

URL: http://svn.apache.org/viewvc?view=rev&rev=560421
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103

Adding in more Types wrappers

Modified:
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Character.h
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.h
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.h
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Short.h

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Character.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Character.h?view=diff&rev=560421&r1=560420&r2=560421
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Character.h (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Character.h Fri Jul 27 16:32:37
2007
@@ -38,13 +38,13 @@
         static const int MAX_RADIX = 36;
 
         /** The minimum value that a signed char can take on. */
-        static const int MIN_VALUE = (-(1 << sizeof(char)));
+        static const char MIN_VALUE = (char)0x7F;
 
         /** The maximum value that a signed char can take on. */
-        static const int MAX_VALUE = (1 << sizeof(char) - 1);
+        static const char MAX_VALUE = (char)0x80;
 
         /** The size of the primitive charactor in bits. */
-        static const int SIZE = sizeof( char ) * 8;
+        static const int SIZE = 8;
 
     public:
 

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.h?view=diff&rev=560421&r1=560420&r2=560421
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.h (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.h Fri Jul 27 16:32:37
2007
@@ -27,11 +27,29 @@
 namespace lang{
 
     class DECAF_API Integer : public Number {
+    private:
+
+        // The primitve Integer value.
+        int value;
+
+    public:
+
+        /** The size in bits of the primitive int type */
+        static const int SIZE = 32;
+
+        /** The maximum value that the primitive type can hold */
+        static const int MAX_VALUE = (int)0x7FFFFFFF;
+
+        /** The minimum value that the primitive type can hold */
+        static const int MIN_VALUE = (int)0x80000000;
+
     public:
 
         Integer() {}
 
         virtual ~Integer() {}
+
+    public:  // Statics
 
         /**
          * Parses the String passed and extracts an int.

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.h?view=diff&rev=560421&r1=560420&r2=560421
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.h (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.h Fri Jul 27 16:32:37 2007
@@ -26,6 +26,22 @@
 namespace lang{
 
     class DECAF_API Long : public Number{
+    private:
+
+        // The primitive long long value
+        long long value;
+
+    public:
+
+        /** The size in bits of the primitive long long type */
+        static const int SIZE = 64;
+
+        /** The maximum value that the primitive type can hold */
+        static const long long MAX_VALUE = (long long)0x7FFFFFFFFFFFFFFFLL;
+
+        /** The minimum value that the primitive type can hold */
+        static const long long MIN_VALUE = (long long)0x8000000000000000LL;
+
     public:
 
         Long() {}

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Short.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Short.h?view=diff&rev=560421&r1=560420&r2=560421
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Short.h (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Short.h Fri Jul 27 16:32:37
2007
@@ -35,14 +35,14 @@
 
     public:
 
-        /** Max Value for this Object's primitive type */
-        static const short MAX_VALUE = ((1 << sizeof(short)) - 1);
+        /** Size of this objects primitive type in bits */
+        static const int SIZE = 16;
 
         /** Max Value for this Object's primitive type */
-        static const short MIN_VALUE = (-(1 << sizeof(short)));
+        static const short MAX_VALUE = (short)0x7FFF;
 
-        /** Size of this objects primitive type in bits */
-        static const int SIZE = sizeof( short ) * 8;
+        /** Max Value for this Object's primitive type */
+        static const short MIN_VALUE = (short)0x8000;
 
     public:
 



Mime
View raw message