From 9649f8ccca2a9f62a946bd58e7d3e8cb60031232 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 31 Mar 2008 17:20:08 +0000 Subject: Updated xml fragment to reflect correct types for connection.start.mechanisms, connection.start.locales and connection.open.capabilities Updated connection handler in line with above changes Added Str16Value to FieldValues Allow Array instances of different types to be created git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@643067 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/FieldValue.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cpp/src/qpid/framing/FieldValue.cpp') diff --git a/cpp/src/qpid/framing/FieldValue.cpp b/cpp/src/qpid/framing/FieldValue.cpp index 961b6017cd..cbda061209 100644 --- a/cpp/src/qpid/framing/FieldValue.cpp +++ b/cpp/src/qpid/framing/FieldValue.cpp @@ -25,6 +25,11 @@ namespace qpid { namespace framing { +uint8_t FieldValue::getType() +{ + return typeOctet; +} + void FieldValue::setType(uint8_t type) { typeOctet = type; @@ -106,6 +111,14 @@ StringValue::StringValue(const std::string& v) : { } +Str16Value::Str16Value(const std::string& v) : + FieldValue( + 0x95, + new VariableWidthValue<2>( + reinterpret_cast(v.data()), + reinterpret_cast(v.data()+v.size()))) +{} + IntegerValue::IntegerValue(int v) : FieldValue(0x21, new FixedWidthValue<4>(v)) { -- cgit v1.2.1