diff options
author | Gordon Sim <gsim@apache.org> | 2007-08-22 08:54:54 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-08-22 08:54:54 +0000 |
commit | 4a362885479d9d8de7d922db60ca220c537afa11 (patch) | |
tree | cae7eeb5a43f87b5e5fce41a0e46f79c01ec56ea /cpp/src | |
parent | 9ef0c3dc8bc5ef4af668a3c19f8e254fb5e01ada (diff) | |
download | qpid-python-4a362885479d9d8de7d922db60ca220c537afa11.tar.gz |
Reapply rev 568249 with the changes made to the generator this time, rather than the generated file itself.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568517 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/framing/AMQMethodBody.cpp | 15 | ||||
-rw-r--r-- | cpp/src/qpid/framing/AMQMethodBody.h | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/cpp/src/qpid/framing/AMQMethodBody.cpp b/cpp/src/qpid/framing/AMQMethodBody.cpp index 924d906d43..48b50763fc 100644 --- a/cpp/src/qpid/framing/AMQMethodBody.cpp +++ b/cpp/src/qpid/framing/AMQMethodBody.cpp @@ -19,10 +19,25 @@ * */ #include "AMQMethodBody.h" +#include "qpid/framing/InvocationVisitor.h" namespace qpid { namespace framing { AMQMethodBody::~AMQMethodBody() {} +void AMQMethodBody::invoke(AMQP_ServerOperations& ops) +{ + InvocationVisitor v(&ops); + accept(v); + assert(v.wasHandled()); +} + +bool AMQMethodBody::invoke(Invocable* invocable) +{ + InvocationVisitor v(invocable); + accept(v); + return v.wasHandled(); +} + }} // namespace qpid::framing diff --git a/cpp/src/qpid/framing/AMQMethodBody.h b/cpp/src/qpid/framing/AMQMethodBody.h index 9c776e143b..5acb3a7b66 100644 --- a/cpp/src/qpid/framing/AMQMethodBody.h +++ b/cpp/src/qpid/framing/AMQMethodBody.h @@ -50,8 +50,8 @@ class AMQMethodBody : public AMQBody { virtual MethodId amqpMethodId() const = 0; virtual ClassId amqpClassId() const = 0; - virtual void invoke(AMQP_ServerOperations&) { assert(0); } - virtual bool invoke(Invocable*) { return false; } + void invoke(AMQP_ServerOperations&); + bool invoke(Invocable*); template <class T> bool isA() const { return amqpClassId()==T::CLASS_ID && amqpMethodId()==T::METHOD_ID; |