diff options
author | Ted Ross <tross@apache.org> | 2009-09-29 03:21:49 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2009-09-29 03:21:49 +0000 |
commit | 7661c82fc7aaca543582ef45582d87de3c5de5b7 (patch) | |
tree | 9de25825187c0a45df5880ce74e58befb6c4ec50 /cpp/src/qmf/engine/ObjectIdImpl.cpp | |
parent | 576b578d61d0d31082587bf77a25a59da2ba738f (diff) | |
download | qpid-python-7661c82fc7aaca543582ef45582d87de3c5de5b7.tar.gz |
QMF Engine updates:
- Connected console handler callbacks
- Added string representations for a number of object classes
- Added a feature that completes query requests sent to disconnected agents
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@819819 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qmf/engine/ObjectIdImpl.cpp')
-rw-r--r-- | cpp/src/qmf/engine/ObjectIdImpl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/qmf/engine/ObjectIdImpl.cpp b/cpp/src/qmf/engine/ObjectIdImpl.cpp index 032bc557c0..5b925045bf 100644 --- a/cpp/src/qmf/engine/ObjectIdImpl.cpp +++ b/cpp/src/qmf/engine/ObjectIdImpl.cpp @@ -111,13 +111,14 @@ void ObjectIdImpl::fromString(const std::string& repr) agent = 0; } -std::string ObjectIdImpl::asString() const +const string& ObjectIdImpl::asString() const { stringstream val; val << (int) getFlags() << "-" << getSequence() << "-" << getBrokerBank() << "-" << getAgentBank() << "-" << getObjectNum(); - return val.str(); + repr = val.str(); + return repr; } bool ObjectIdImpl::operator==(const ObjectIdImpl& other) const @@ -154,6 +155,7 @@ uint64_t ObjectId::getObjectNum() const { return impl->getObjectNum(); } uint32_t ObjectId::getObjectNumHi() const { return impl->getObjectNumHi(); } uint32_t ObjectId::getObjectNumLo() const { return impl->getObjectNumLo(); } bool ObjectId::isDurable() const { return impl->isDurable(); } +const char* ObjectId::str() const { return impl->asString().c_str(); } bool ObjectId::operator==(const ObjectId& other) const { return *impl == *other.impl; } bool ObjectId::operator<(const ObjectId& other) const { return *impl < *other.impl; } bool ObjectId::operator>(const ObjectId& other) const { return *impl > *other.impl; } |