You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/07/26 21:02:29 UTC
svn commit: r559940 - in
/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang: Boolean.cpp
Boolean.h Integer.cpp Integer.h Long.cpp Long.h Number.h
Author: tabish
Date: Thu Jul 26 12:02:27 2007
New Revision: 559940
URL: http://svn.apache.org/viewvc?view=rev&rev=559940
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103
Implementing the Primitive Wrappers fully
Modified:
activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.cpp
activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.h
activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.cpp
activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.h
activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.cpp
activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.h
activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Number.h
Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.cpp?view=diff&rev=559940&r1=559939&r2=559940
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.cpp (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.cpp Thu Jul 26 12:02:27 2007
@@ -16,6 +16,7 @@
*/
#include "Boolean.h"
+#include <sstream>
using namespace decaf;
using namespace decaf::lang;
Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.h?view=diff&rev=559940&r1=559939&r2=559940
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.h (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Boolean.h Thu Jul 26 12:02:27 2007
@@ -18,8 +18,9 @@
#ifndef _DECAF_LANG_BOOLEAN_H_
#define _DECAF_LANG_BOOLEAN_H_
-#include <decaf/lang/Number.h>
+#include <string>
#include <decaf/lang/Comparable.h>
+#include <decaf/util/Config.h>
namespace decaf{
namespace lang{
Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.cpp?view=diff&rev=559940&r1=559939&r2=559940
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.cpp (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Integer.cpp Thu Jul 26 12:02:27 2007
@@ -16,7 +16,9 @@
*/
#include "Integer.h"
+#include <sstream>
+using namespace decaf;
using namespace decaf::lang;
////////////////////////////////////////////////////////////////////////////////
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=559940&r1=559939&r2=559940
==============================================================================
--- 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 Thu Jul 26 12:02:27 2007
@@ -19,6 +19,7 @@
#define _DECAF_LANG_INTEGER_H_
#include <decaf/lang/Number.h>
+#include <string>
namespace decaf{
namespace lang{
Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.cpp?view=diff&rev=559940&r1=559939&r2=559940
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.cpp (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Long.cpp Thu Jul 26 12:02:27 2007
@@ -16,7 +16,9 @@
*/
#include "Long.h"
+#include <sstream>
+using namespace decaf;
using namespace decaf::lang;
////////////////////////////////////////////////////////////////////////////////
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=559940&r1=559939&r2=559940
==============================================================================
--- 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 Thu Jul 26 12:02:27 2007
@@ -19,6 +19,7 @@
#define _DECAF_LANG_LONG_H_
#include <decaf/lang/Number.h>
+#include <string>
namespace decaf{
namespace lang{
Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Number.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Number.h?view=diff&rev=559940&r1=559939&r2=559940
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Number.h (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/lang/Number.h Thu Jul 26 12:02:27 2007
@@ -18,7 +18,6 @@
#ifndef _DECAF_LANG_NUMBER_H_
#define _DECAF_LANG_NUMBER_H_
-#include <sstream>
#include <decaf/util/Config.h>
namespace decaf{
@@ -35,6 +34,46 @@
public:
virtual ~Number() {}
+
+ /**
+ * Answers the byte value which the receiver represents
+ * @return byte the value of the receiver.
+ */
+ virtual unsigned char byteValue() const {
+ return (unsigned char)intValue();
+ }
+
+ /**
+ * Answers the double value which the receiver represents
+ * @return double the value of the receiver.
+ */
+ virtual double doubleValue() const = 0;
+
+ /**
+ * Answers the float value which the receiver represents
+ * @return float the value of the receiver.
+ */
+ virtual float floatValue() const = 0;
+
+ /**
+ * Answers the int value which the receiver represents
+ * @return int the value of the receiver.
+ */
+ virtual int intValue() const = 0;
+
+ /**
+ * Answers the long value which the receiver represents
+ * @return long the value of the receiver.
+ */
+ virtual long longValue() const = 0;
+
+ /**
+ * Answers the short value which the receiver represents
+ * @return short the value of the receiver.
+ */
+ virtual short shortValue() const {
+ return (short) intValue();
+ }
};