activemq-cpp-3.3.0

src/main/activemq/commands/ActiveMQMessage.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_ACTIVEMQMESSAGE_H_
00019 #define _ACTIVEMQ_COMMANDS_ACTIVEMQMESSAGE_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 <cms/Message.h>
00027 #include <activemq/util/Config.h>
00028 #include <activemq/commands/ActiveMQMessageTemplate.h>
00029 
00030 namespace activemq{
00031 namespace commands{
00032 
00033     class AMQCPP_API ActiveMQMessage :
00034         public ActiveMQMessageTemplate<cms::Message> {
00035 
00036     public:
00037 
00038         static const unsigned char ID_ACTIVEMQMESSAGE = 23;
00039 
00040     private:
00041 
00042         ActiveMQMessage( const ActiveMQMessage& );
00043         ActiveMQMessage& operator= ( const ActiveMQMessage& );
00044 
00045     public:
00046 
00047         ActiveMQMessage();
00048 
00049         virtual ~ActiveMQMessage() throw() {}
00050 
00051         virtual unsigned char getDataStructureType() const;
00052 
00053         virtual void copyDataStructure( const DataStructure* src );
00054 
00055         virtual ActiveMQMessage* cloneDataStructure() const;
00056 
00057         virtual std::string toString() const;
00058 
00059         virtual bool equals( const DataStructure* value ) const;
00060 
00061     public:  // cms::Message
00062 
00063         virtual cms::Message* clone() const {
00064             return dynamic_cast<cms::Message*>( this->cloneDataStructure() );
00065         }
00066 
00067     };
00068 
00069 }}
00070 
00071 #endif /*_ACTIVEMQ_COMMANDS_ACTIVEMQMESSAGE_H_*/