Author: tabish
Date: Fri Jul 27 14:23:42 2007
New Revision: 560388
URL: http://svn.apache.org/viewvc?view=rev&rev=560388
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103
Adding in more Types wrappers
Modified:
activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am
activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Character.h
activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Short.h
Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am?view=diff&rev=560388&r1=560387&r2=560388
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am Fri Jul 27 14:23:42 2007
@@ -25,6 +25,7 @@
decaf/net/SocketFactory.cpp \
decaf/lang/Exception.cpp \
decaf/lang/Thread.cpp \
+ decaf/lang/Character.cpp \
decaf/lang/Boolean.cpp \
decaf/lang/Short.cpp \
decaf/lang/Integer.cpp \
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=560388&r1=560387&r2=560388
==============================================================================
--- 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 14:23:42
2007
@@ -24,8 +24,45 @@
namespace lang{
class DECAF_API Character{
+ private:
+
+ // The primitive Char value
+ char value;
public:
+
+ /** The minimum radix available for conversion to and from strings. */
+ static const int MIN_RADIX = 2;
+
+ /** The maximum radix available for conversion to and from strings. */
+ static const int MAX_RADIX = 36;
+
+ /** The minimum value that a signed char can take on. */
+ static const int MIN_VALUE = (-(1 << sizeof(char)));
+
+ /** The maximum value that a signed char can take on. */
+ static const int MAX_VALUE = (1 << sizeof(char) - 1);
+
+ /** The size of the primitive charactor in bits. */
+ static const int SIZE = sizeof( char ) * 8;
+
+ public:
+
+ /**
+ * @param value - char to wrap.
+ */
+ Character( char value );
+
+ public: // statics
+
+ /**
+ * Returns a Character instance representing the specified char value.
+ * @param value - the primitive char to wrap.
+ * @returns a new Charactor instance that wraps this value.
+ */
+ static Character valueOf( char value ) {
+ return Character( value );
+ }
/**
* Indicates whether or not the given character is considered
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=560388&r1=560387&r2=560388
==============================================================================
--- 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 14:23:42
2007
@@ -35,21 +35,14 @@
public:
- /**
- * Max Value for this Object's primitive type
- */
+ /** Max Value for this Object's primitive type */
static const short MAX_VALUE = ((1 << sizeof(short)) - 1);
- /**
- * Max Value for this Object's primitive type
- */
+ /** Max Value for this Object's primitive type */
static const short MIN_VALUE = (-(1 << sizeof(short)));
- /**
- * Size of this objects primitive type
- */
- static const int SIZE = sizeof( short );
-
+ /** Size of this objects primitive type in bits */
+ static const int SIZE = sizeof( short ) * 8;
public:
@@ -137,11 +130,11 @@
public: // statics
- /**
- * @returns a string representing the primitive value as Base 10
- */
- static std::string toString( short value );
-
+ /**
+ * @returns a string representing the primitive value as Base 10
+ */
+ static std::string toString( short value );
+
/**
* Decodes a String into a Short. Accepts decimal, hexadecimal, and octal
* numbers given by the following grammar:
|