From 3f0838479df2a5678a6093f34276b9e336af3ded Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Tue, 15 Sep 2009 17:45:51 +0000 Subject: QMF Console updated to the point where query (get_object) is supported. The Ruby binding continues to track the c++ engine progress. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@815416 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qmf/ObjectIdImpl.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'cpp/src/qmf/ObjectIdImpl.cpp') diff --git a/cpp/src/qmf/ObjectIdImpl.cpp b/cpp/src/qmf/ObjectIdImpl.cpp index 75661fdb47..c0618ccc49 100644 --- a/cpp/src/qmf/ObjectIdImpl.cpp +++ b/cpp/src/qmf/ObjectIdImpl.cpp @@ -100,6 +100,15 @@ void ObjectIdImpl::fromString(const std::string& repr) agent = 0; } +std::string ObjectIdImpl::asString() const +{ + stringstream val; + + val << getFlags() << "-" << getSequence() << "-" << getBrokerBank() << "-" << + getAgentBank() << "-" << getObjectNum(); + return val.str(); +} + bool ObjectIdImpl::operator==(const ObjectIdImpl& other) const { uint64_t otherFirst = agent == 0 ? other.first : other.first & 0xffff000000000000LL; @@ -126,15 +135,11 @@ bool ObjectIdImpl::operator>(const ObjectIdImpl& other) const // Wrappers //================================================================== -ObjectId::ObjectId() -{ - impl = new ObjectIdImpl(this); -} +ObjectId::ObjectId() : impl(new ObjectIdImpl(this)) {} -ObjectId::ObjectId(ObjectIdImpl* i) -{ - impl = i; -} +ObjectId::ObjectId(const ObjectId& from) : impl(new ObjectIdImpl(*(from.impl))) {} + +ObjectId::ObjectId(ObjectIdImpl* i) : impl(i) {} ObjectId::~ObjectId() { -- cgit v1.2.1