From 604b624676c20770d6b6b30be3b2fb357892982e Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Mon, 13 Oct 2008 18:07:07 +0000 Subject: QPID-1351 -Support for sequencing messages through an exchange -Related changes - Bug fix for ptr saftey in Headers & FanOut exchange - Added support for int64 and uint64 in fieldvalue / fieldtable - Added tests for fieldtable - Added tests for sequencing message feature. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@704192 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/FieldTable.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cpp/src/qpid/framing/FieldTable.cpp') diff --git a/cpp/src/qpid/framing/FieldTable.cpp b/cpp/src/qpid/framing/FieldTable.cpp index 290983e304..013bcd1797 100644 --- a/cpp/src/qpid/framing/FieldTable.cpp +++ b/cpp/src/qpid/framing/FieldTable.cpp @@ -74,10 +74,18 @@ void FieldTable::setInt(const std::string& name, int value){ values[name] = ValuePtr(new IntegerValue(value)); } +void FieldTable::setInt64(const std::string& name, int64_t value){ + values[name] = ValuePtr(new Integer64Value(value)); +} + void FieldTable::setTimestamp(const std::string& name, uint64_t value){ values[name] = ValuePtr(new TimeValue(value)); } +void FieldTable::setUInt64(const std::string& name, uint64_t value){ + values[name] = ValuePtr(new Unsigned64Value(value)); +} + void FieldTable::setTable(const std::string& name, const FieldTable& value) { values[name] = ValuePtr(new FieldTableValue(value)); @@ -131,6 +139,14 @@ int FieldTable::getInt(const std::string& name) const { // return getValue(name); //} +uint64_t FieldTable::getAsUInt64(const std::string& name) const { + return static_cast( getValue(get(name))); +} + +int64_t FieldTable::getAsInt64(const std::string& name) const { + return getValue(get(name)); +} + bool FieldTable::getTable(const std::string& name, FieldTable& value) const { return getEncodedValue(get(name), value); } -- cgit v1.2.1