summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-02-04 17:25:19 +0000
committerTed Ross <tross@apache.org>2010-02-04 17:25:19 +0000
commit62b6eaea83d81155695d19dc716ad97094e89e54 (patch)
tree3b21154cf6f10b52e6fff31ffec7cbca689e032a /cpp/src
parent48417321a4e7ac68950e010a2514ce95a9b0aa42 (diff)
downloadqpid-python-62b6eaea83d81155695d19dc716ad97094e89e54.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/qpid@906573 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/management/ManagementObject.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/cpp/src/qpid/management/ManagementObject.cpp b/cpp/src/qpid/management/ManagementObject.cpp
index 6cbe386517..4ac6613419 100644
--- a/cpp/src/qpid/management/ManagementObject.cpp
+++ b/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() {