diff options
author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-04-23 20:27:27 +0000 |
---|---|---|
committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-04-23 20:27:27 +0000 |
commit | 74b68e0be99c74b8f59ef97a3a9162d5a8dfe257 (patch) | |
tree | 61081a73bc69a38555c902fbb5e3943875dd9cb1 /cpp/src/qmf/engine/EventImpl.cpp | |
parent | 1256ed9262d0a8f769a72eb83b1669b33e1f7f59 (diff) | |
download | qpid-python-74b68e0be99c74b8f59ef97a3a9162d5a8dfe257.tar.gz |
QPID-2546: implement event support for ruby wrapper. Python pending...
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@937506 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qmf/engine/EventImpl.cpp')
-rw-r--r-- | cpp/src/qmf/engine/EventImpl.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/cpp/src/qmf/engine/EventImpl.cpp b/cpp/src/qmf/engine/EventImpl.cpp index 3509220b0c..4b034e8e83 100644 --- a/cpp/src/qmf/engine/EventImpl.cpp +++ b/cpp/src/qmf/engine/EventImpl.cpp @@ -26,7 +26,7 @@ using namespace std; using namespace qmf::engine; using qpid::framing::Buffer; -EventImpl::EventImpl(const SchemaEventClass* type) : eventClass(type) +EventImpl::EventImpl(const SchemaEventClass* type) : eventClass(type), timestamp(0), severity(0) { int argCount = eventClass->getArgumentCount(); int idx; @@ -38,9 +38,21 @@ EventImpl::EventImpl(const SchemaEventClass* type) : eventClass(type) } -EventImpl::EventImpl(const SchemaEventClass* type, Buffer&) : - eventClass(type) +EventImpl::EventImpl(const SchemaEventClass* type, Buffer& buffer) : + eventClass(type), timestamp(0), severity(0) { + int argCount = eventClass->getArgumentCount(); + int idx; + + timestamp = buffer.getLongLong(); + severity = buffer.getOctet(); + + for (idx = 0; idx < argCount; idx++) + { + const SchemaArgument *arg = eventClass->getArgument(idx); + Value* pval = ValueImpl::factory(arg->getType(), buffer); + arguments[arg->getName()] = ValuePtr(pval); + } } |