summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/FieldValue.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-09-19 22:31:45 +0000
committerGordon Sim <gsim@apache.org>2008-09-19 22:31:45 +0000
commit7c70d21ca2d788d4432cfa89851c9b928c9f30aa (patch)
tree01ec869bf97701c6de28cdf06f9db11f8782a793 /cpp/src/qpid/framing/FieldValue.cpp
parentceababe179b3f80a9444eef358f7ff96c81f7a18 (diff)
downloadqpid-python-7c70d21ca2d788d4432cfa89851c9b928c9f30aa.tar.gz
Support floats and doubles in field tables.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@697269 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/FieldValue.cpp')
-rw-r--r--cpp/src/qpid/framing/FieldValue.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/qpid/framing/FieldValue.cpp b/cpp/src/qpid/framing/FieldValue.cpp
index 3b3c2f2126..bbef9ebceb 100644
--- a/cpp/src/qpid/framing/FieldValue.cpp
+++ b/cpp/src/qpid/framing/FieldValue.cpp
@@ -138,6 +138,14 @@ IntegerValue::IntegerValue(int v) :
{
}
+FloatValue::FloatValue(float v) :
+ FieldValue(0x23, new FixedWidthValue<4>(reinterpret_cast<uint8_t*>(&v)))
+{}
+
+DoubleValue::DoubleValue(double v) :
+ FieldValue(0x33, new FixedWidthValue<8>(reinterpret_cast<uint8_t*>(&v)))
+{}
+
TimeValue::TimeValue(uint64_t v) :
FieldValue(0x32, new FixedWidthValue<8>(v))
{