summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qmf/engine/EventImpl.cpp
diff options
context:
space:
mode:
authorKenneth Anthony Giusti <kgiusti@apache.org>2010-04-23 20:27:27 +0000
committerKenneth Anthony Giusti <kgiusti@apache.org>2010-04-23 20:27:27 +0000
commit944b2eb07f51118a37bacf3124dc19c0b7d85ca8 (patch)
tree5ac8c02fdb578f93e8e73d01c1e42eb56e202ac4 /qpid/cpp/src/qmf/engine/EventImpl.cpp
parent5e4a9f8dd51364ef4479c0c94d339b8dade93640 (diff)
downloadqpid-python-944b2eb07f51118a37bacf3124dc19c0b7d85ca8.tar.gz
QPID-2546: implement event support for ruby wrapper. Python pending...
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@937506 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qmf/engine/EventImpl.cpp')
-rw-r--r--qpid/cpp/src/qmf/engine/EventImpl.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/qpid/cpp/src/qmf/engine/EventImpl.cpp b/qpid/cpp/src/qmf/engine/EventImpl.cpp
index 3509220b0c..4b034e8e83 100644
--- a/qpid/cpp/src/qmf/engine/EventImpl.cpp
+++ b/qpid/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);
+ }
}