diff options
| author | Ted Ross <tross@apache.org> | 2010-02-04 17:25:19 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-02-04 17:25:19 +0000 |
| commit | 3a7f44a61ce4cada2bfce431e405652744368ab3 (patch) | |
| tree | bc27bcffa24c1f49e2b6746c0780c65d18e6dca6 /qpid/cpp/src | |
| parent | d2a27ff6c8d66bcc50dcf60601884441737fd601 (diff) | |
| download | qpid-python-3a7f44a61ce4cada2bfce431e405652744368ab3.tar.gz | |
Added encode/decode/encodedSize methods for management objects.
Made methods on generated code public.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@906573 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/management/ManagementObject.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/management/ManagementObject.cpp b/qpid/cpp/src/qpid/management/ManagementObject.cpp index 6cbe386517..4ac6613419 100644 --- a/qpid/cpp/src/qpid/management/ManagementObject.cpp +++ b/qpid/cpp/src/qpid/management/ManagementObject.cpp @@ -121,7 +121,7 @@ bool ObjectId::operator<(const ObjectId &other) const return (first < otherFirst) || ((first == otherFirst) && (second < other.second)); } -void ObjectId::encode(framing::Buffer& buffer) +void ObjectId::encode(framing::Buffer& buffer) const { if (agent == 0) buffer.putLongLong(first); @@ -158,7 +158,7 @@ std::ostream& operator<<(std::ostream& out, const ObjectId& i) int ManagementObject::maxThreads = 1; int ManagementObject::nextThreadIndex = 0; -void ManagementObject::writeTimestamps (framing::Buffer& buf) +void ManagementObject::writeTimestamps (framing::Buffer& buf) const { buf.putShortString (getPackageName ()); buf.putShortString (getClassName ()); @@ -184,6 +184,17 @@ void ManagementObject::readTimestamps (framing::Buffer& buf) unusedObjectId.decode(buf); } +uint32_t ManagementObject::writeTimestampsSize() const +{ + return 1 + getPackageName().length() + // str8 + 1 + getClassName().length() + // str8 + 16 + // bin128 + 8 + // uint64 + 8 + // uint64 + 8 + // uint64 + objectId.encodedSize(); // objectId +} + void ManagementObject::setReference(ObjectId) {} int ManagementObject::getThreadIndex() { |
