diff options
| author | Carl C. Trieloff <cctrieloff@apache.org> | 2008-10-13 18:07:07 +0000 |
|---|---|---|
| committer | Carl C. Trieloff <cctrieloff@apache.org> | 2008-10-13 18:07:07 +0000 |
| commit | 604b624676c20770d6b6b30be3b2fb357892982e (patch) | |
| tree | d9cf003df5760f7815f94e9181df5429b1bbeaf4 /cpp/src/qpid/framing/FieldTable.cpp | |
| parent | 02b136ad60558724e77cb1d72d9ca06679c7df87 (diff) | |
| download | qpid-python-604b624676c20770d6b6b30be3b2fb357892982e.tar.gz | |
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
Diffstat (limited to 'cpp/src/qpid/framing/FieldTable.cpp')
| -rw-r--r-- | cpp/src/qpid/framing/FieldTable.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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<uint64_t>(name); //} +uint64_t FieldTable::getAsUInt64(const std::string& name) const { + return static_cast<uint64_t>( getValue<int64_t>(get(name))); +} + +int64_t FieldTable::getAsInt64(const std::string& name) const { + return getValue<int64_t>(get(name)); +} + bool FieldTable::getTable(const std::string& name, FieldTable& value) const { return getEncodedValue<FieldTable>(get(name), value); } |
