summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qmf/engine/EventImpl.cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-02-19 22:52:43 +0000
committerTed Ross <tross@apache.org>2010-02-19 22:52:43 +0000
commit0f485552e3c5c59db7d267dcaf9d371c807443ea (patch)
treef13ec2d843715c58a3fece8a5804af478aa3b937 /qpid/cpp/src/qmf/engine/EventImpl.cpp
parent2530d09b874d23edf5ec9743d1e4ad1589bd4443 (diff)
downloadqpid-python-0f485552e3c5c59db7d267dcaf9d371c807443ea.tar.gz
The tree now builds up to the point of running swig.
Changes: 1) Cleaned up the Schema definitions to match the wiki documentation for QMFv2 a) Combined "argument" into "property" and eliminated "argument" b) Removed the distinction between ObjectClass and EventClass Event classes are now represented as Object classes without methods 2) Removed old buffer-codec encode/decode for schema types and replaced them with map-based equivalents. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qmf-devel0.7@912022 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, 9 insertions, 9 deletions
diff --git a/qpid/cpp/src/qmf/engine/EventImpl.cpp b/qpid/cpp/src/qmf/engine/EventImpl.cpp
index 6bdda9321e..79d5a491fc 100644
--- a/qpid/cpp/src/qmf/engine/EventImpl.cpp
+++ b/qpid/cpp/src/qmf/engine/EventImpl.cpp
@@ -26,12 +26,12 @@ using qpid::framing::Buffer;
EventImpl::EventImpl(const SchemaEventClass* type) : eventClass(type)
{
- int argCount = eventClass->getArgumentCount();
+ int argCount = eventClass->getPropertyCount();
int idx;
for (idx = 0; idx < argCount; idx++) {
- const SchemaArgument* arg = eventClass->getArgument(idx);
- arguments[arg->getName()] = ValuePtr(new Value(arg->getType()));
+ const SchemaProperty* arg = eventClass->getProperty(idx);
+ properties[arg->getName()] = ValuePtr(new Value(arg->getType()));
}
}
@@ -53,8 +53,8 @@ Value* EventImpl::getValue(const char* key) const
{
map<string, ValuePtr>::const_iterator iter;
- iter = arguments.find(key);
- if (iter != arguments.end())
+ iter = properties.find(key);
+ if (iter != properties.end())
return iter->second.get();
return 0;
@@ -65,7 +65,7 @@ void EventImpl::encodeSchemaKey(Buffer& buffer) const
{
buffer.putShortString(eventClass->getClassKey()->getPackageName());
buffer.putShortString(eventClass->getClassKey()->getClassName());
- buffer.putBin128(const_cast<uint8_t*>(eventClass->getClassKey()->getHash()));
+ buffer.putBin128(const_cast<uint8_t*>(eventClass->getClassKey()->getHashData()));
}
@@ -73,10 +73,10 @@ void EventImpl::encode(Buffer& buffer) const
{
buffer.putOctet((uint8_t) eventClass->getSeverity());
- int argCount = eventClass->getArgumentCount();
+ int argCount = eventClass->getPropertyCount();
for (int idx = 0; idx < argCount; idx++) {
- const SchemaArgument* arg = eventClass->getArgument(idx);
- ValuePtr value = arguments[arg->getName()];
+ const SchemaProperty* arg = eventClass->getProperty(idx);
+ ValuePtr value = properties[arg->getName()];
value->impl->encode(buffer);
}
}