diff options
author | Ted Ross <tross@apache.org> | 2009-09-21 16:24:38 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2009-09-21 16:24:38 +0000 |
commit | 4c9e6b30e9410cb32367be87ca9bbf941df750dc (patch) | |
tree | b64a637ec4e4edf0c5240d0cfcc9b006f42b486c /cpp/src/qmf/ObjectImpl.cpp | |
parent | a5283e144f9107e3e735379ddd68d8d29e9fdb53 (diff) | |
download | qpid-python-4c9e6b30e9410cb32367be87ca9bbf941df750dc.tar.gz |
Added Ruby test infrastructure and Console tests in Ruby
Fixed issues identified by the new tests:
- Improper formatting of object-id in get-query
- Remote (non-broker-resident) agents not visible to the console
- object.update() and object.merge() not implemented
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@817312 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qmf/ObjectImpl.cpp')
-rw-r--r-- | cpp/src/qmf/ObjectImpl.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cpp/src/qmf/ObjectImpl.cpp b/cpp/src/qmf/ObjectImpl.cpp index f78808376f..99d1fb4354 100644 --- a/cpp/src/qmf/ObjectImpl.cpp +++ b/cpp/src/qmf/ObjectImpl.cpp @@ -118,6 +118,16 @@ void ObjectImpl::invokeMethod(const string& methodName, const Value* inArgs, voi broker->sendMethodRequest(objectId.get(), objectClass, methodName, inArgs, context); } +void ObjectImpl::merge(const Object& from) +{ + for (map<string, ValuePtr>::const_iterator piter = from.impl->properties.begin(); + piter != from.impl->properties.end(); piter++) + properties[piter->first] = piter->second; + for (map<string, ValuePtr>::const_iterator siter = from.impl->statistics.begin(); + siter != from.impl->statistics.end(); siter++) + statistics[siter->first] = siter->second; +} + void ObjectImpl::parsePresenceMasks(Buffer& buffer, set<string>& excludeList) { int propCount = objectClass->getPropertyCount(); @@ -215,6 +225,8 @@ void Object::destroy() { impl->destroy(); } const ObjectId* Object::getObjectId() const { return impl->getObjectId(); } void Object::setObjectId(ObjectId* oid) { impl->setObjectId(oid); } const SchemaObjectClass* Object::getClass() const { return impl->getClass(); } -Value* Object::getValue(char* key) const { return impl->getValue(key); } +Value* Object::getValue(const char* key) const { return impl->getValue(key); } void Object::invokeMethod(const char* m, const Value* a, void* c) const { impl->invokeMethod(m, a, c); } +bool Object::isDeleted() const { return impl->isDeleted(); } +void Object::merge(const Object& from) { impl->merge(from); } |