From 4baadbaa1fbbbedaf9b737fda27829ec45671e5a Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Thu, 15 Mar 2012 22:10:50 +0000 Subject: NO-JIRA: Removed unused code git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1301239 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/CMakeLists.txt | 1 - cpp/src/Makefile.am | 2 -- cpp/src/qpid/framing/BodyHandler.cpp | 58 ------------------------------------ cpp/src/qpid/framing/BodyHandler.h | 56 ---------------------------------- cpp/src/qpid/framing/amqp_framing.h | 1 - 5 files changed, 118 deletions(-) delete mode 100644 cpp/src/qpid/framing/BodyHandler.cpp delete mode 100644 cpp/src/qpid/framing/BodyHandler.h (limited to 'cpp/src') diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index cfcdead883..b6ce249708 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -874,7 +874,6 @@ set (qpidcommon_SOURCES qpid/framing/AMQHeaderBody.cpp qpid/framing/AMQHeartbeatBody.cpp qpid/framing/Array.cpp - qpid/framing/BodyHandler.cpp qpid/framing/Buffer.cpp qpid/framing/Endian.cpp qpid/framing/FieldTable.cpp diff --git a/cpp/src/Makefile.am b/cpp/src/Makefile.am index e03c88ec8b..5dcc4cd210 100644 --- a/cpp/src/Makefile.am +++ b/cpp/src/Makefile.am @@ -398,8 +398,6 @@ libqpidcommon_la_SOURCES += \ qpid/framing/AccumulatedAck.h \ qpid/framing/Array.cpp \ qpid/framing/BodyFactory.h \ - qpid/framing/BodyHandler.cpp \ - qpid/framing/BodyHandler.h \ qpid/framing/Buffer.cpp \ qpid/framing/ResizableBuffer.h \ qpid/framing/ChannelHandler.h \ diff --git a/cpp/src/qpid/framing/BodyHandler.cpp b/cpp/src/qpid/framing/BodyHandler.cpp deleted file mode 100644 index 5ac9d84717..0000000000 --- a/cpp/src/qpid/framing/BodyHandler.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#include "qpid/framing/BodyHandler.h" - -#include "qpid/framing/AMQMethodBody.h" -#include "qpid/framing/AMQHeaderBody.h" -#include "qpid/framing/AMQContentBody.h" -#include "qpid/framing/AMQHeartbeatBody.h" -#include "qpid/framing/reply_exceptions.h" -#include "qpid/Msg.h" - -#include - -using namespace qpid::framing; -using boost::polymorphic_downcast; - -BodyHandler::~BodyHandler() {} - -// TODO aconway 2007-08-13: Replace with visitor. -void BodyHandler::handleBody(AMQBody* body) { - switch(body->type()) - { - case METHOD_BODY: - handleMethod(polymorphic_downcast(body)); - break; - case HEADER_BODY: - handleHeader(polymorphic_downcast(body)); - break; - case CONTENT_BODY: - handleContent(polymorphic_downcast(body)); - break; - case HEARTBEAT_BODY: - handleHeartbeat(polymorphic_downcast(body)); - break; - default: - throw FramingErrorException( - QPID_MSG("Invalid frame type " << body->type())); - } -} - diff --git a/cpp/src/qpid/framing/BodyHandler.h b/cpp/src/qpid/framing/BodyHandler.h deleted file mode 100644 index 9ded737195..0000000000 --- a/cpp/src/qpid/framing/BodyHandler.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _BodyHandler_ -#define _BodyHandler_ - -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include - -namespace qpid { -namespace framing { -class AMQBody; -class AMQMethodBody; -class AMQHeaderBody; -class AMQContentBody; -class AMQHeartbeatBody; - -// TODO aconway 2007-08-10: rework using Visitor pattern? - -/** - * Interface to handle incoming frame bodies. - * Derived classes provide logic for each frame type. - */ -class BodyHandler { - public: - virtual ~BodyHandler(); - virtual void handleBody(AMQBody* body); - - protected: - virtual void handleMethod(AMQMethodBody*) = 0; - virtual void handleHeader(AMQHeaderBody*) = 0; - virtual void handleContent(AMQContentBody*) = 0; - virtual void handleHeartbeat(AMQHeartbeatBody*) = 0; -}; - -}} - - -#endif diff --git a/cpp/src/qpid/framing/amqp_framing.h b/cpp/src/qpid/framing/amqp_framing.h index 3a8b39afb5..2e58922364 100644 --- a/cpp/src/qpid/framing/amqp_framing.h +++ b/cpp/src/qpid/framing/amqp_framing.h @@ -21,7 +21,6 @@ #include "qpid/framing/amqp_types.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AMQBody.h" -#include "qpid/framing/BodyHandler.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQHeaderBody.h" #include "qpid/framing/AMQContentBody.h" -- cgit v1.2.1