diff options
author | Ted Ross <tross@apache.org> | 2009-09-17 19:27:52 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2009-09-17 19:27:52 +0000 |
commit | b792f14784600e7a85b41b5dba12bad8560a9077 (patch) | |
tree | 44e22f9dd9784e7c3044b9e53b20a86100ccbb2c /cpp/src/qmf/ObjectImpl.cpp | |
parent | 54acfabb0ae891b0a777cf09c7b9d8de620ce56f (diff) | |
download | qpid-python-b792f14784600e7a85b41b5dba12bad8560a9077.tar.gz |
QMF Console
- Added implementation for method invocation
- Added metaprogramming hooks in Ruby for attribute and method access
- Refactored file structure
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@816345 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, 11 insertions, 3 deletions
diff --git a/cpp/src/qmf/ObjectImpl.cpp b/cpp/src/qmf/ObjectImpl.cpp index 1ea2d54527..216a9d883e 100644 --- a/cpp/src/qmf/ObjectImpl.cpp +++ b/cpp/src/qmf/ObjectImpl.cpp @@ -19,6 +19,7 @@ #include "qmf/ObjectImpl.h" #include "qmf/ValueImpl.h" +#include "qmf/BrokerProxyImpl.h" #include <qpid/sys/Time.h> using namespace std; @@ -27,7 +28,7 @@ using namespace qpid::sys; using qpid::framing::Buffer; ObjectImpl::ObjectImpl(Object* e, const SchemaObjectClass* type) : - envelope(e), objectClass(type), createTime(uint64_t(Duration(now()))), + envelope(e), objectClass(type), broker(0), createTime(uint64_t(Duration(now()))), destroyTime(0), lastUpdatedTime(createTime) { int propCount = objectClass->getPropertyCount(); @@ -45,8 +46,8 @@ ObjectImpl::ObjectImpl(Object* e, const SchemaObjectClass* type) : } } -ObjectImpl::ObjectImpl(const SchemaObjectClass* type, Buffer& buffer, bool prop, bool stat, bool managed) : - envelope(new Object(this)), objectClass(type), createTime(0), destroyTime(0), lastUpdatedTime(0) +ObjectImpl::ObjectImpl(const SchemaObjectClass* type, BrokerProxyImpl* b, Buffer& buffer, bool prop, bool stat, bool managed) : + envelope(new Object(this)), objectClass(type), broker(b), createTime(0), destroyTime(0), lastUpdatedTime(0) { int idx; @@ -107,6 +108,12 @@ Value* ObjectImpl::getValue(const string& key) const return 0; } +void ObjectImpl::invokeMethod(const string& methodName, const Value* inArgs, void* context) const +{ + if (broker != 0 && objectId.get() != 0) + broker->sendMethodRequest(objectId.get(), objectClass, methodName, inArgs, context); +} + void ObjectImpl::parsePresenceMasks(Buffer& buffer, set<string>& excludeList) { int propCount = objectClass->getPropertyCount(); @@ -205,4 +212,5 @@ 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); } +void Object::invokeMethod(const char* m, const Value* a, void* c) const { impl->invokeMethod(m, a, c); } |