activemq-cpp-3.4.0

src/main/activemq/commands/ActiveMQObjectMessage.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  * http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef _ACTIVEMQ_COMMANDS_ACTIVEMQOBJECTMESSAGE_H_
00019 #define _ACTIVEMQ_COMMANDS_ACTIVEMQOBJECTMESSAGE_H_
00020 
00021 // Turn off warning message for ignored exception specification
00022 #ifdef _MSC_VER
00023 #pragma warning( disable : 4290 )
00024 #endif
00025 
00026 #include <activemq/commands/ActiveMQMessageTemplate.h>
00027 #include <cms/ObjectMessage.h>
00028 #include <activemq/util/Config.h>
00029 #include <memory>
00030 
00031 namespace activemq{
00032 namespace commands{
00033 
00034     class AMQCPP_API ActiveMQObjectMessage :
00035         public ActiveMQMessageTemplate<cms::ObjectMessage> {
00036 
00037     public:
00038 
00039         const static unsigned char ID_ACTIVEMQOBJECTMESSAGE = 26;
00040 
00041     private:
00042 
00043         ActiveMQObjectMessage( const ActiveMQObjectMessage& );
00044         ActiveMQObjectMessage& operator= ( const ActiveMQObjectMessage& );
00045 
00046     public:
00047 
00048         ActiveMQObjectMessage();
00049 
00050         virtual ~ActiveMQObjectMessage() throw() {}
00051 
00052         virtual unsigned char getDataStructureType() const;
00053 
00054         virtual ActiveMQObjectMessage* cloneDataStructure() const;
00055 
00056         virtual void copyDataStructure( const DataStructure* src );
00057 
00058         virtual std::string toString() const;
00059 
00060         virtual bool equals( const DataStructure* value ) const;
00061 
00062     public:  // cms::Message
00063 
00064         virtual cms::Message* clone() const {
00065             return dynamic_cast<cms::Message*>( this->cloneDataStructure() );
00066         }
00067 
00068     };
00069 
00070 }}
00071 
00072 #endif /*_ACTIVEMQ_COMMANDS_ACTIVEMQOBJECTMESSAGE_H_*/