diff options
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); + } } |