|
activemq-cpp-3.4.0
|
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 _CMS_MAPMESSAGE_H_ 00019 #define _CMS_MAPMESSAGE_H_ 00020 00021 #include <cms/Config.h> 00022 #include <cms/Message.h> 00023 00024 #include <cms/CMSException.h> 00025 #include <cms/MessageFormatException.h> 00026 #include <cms/MessageNotWriteableException.h> 00027 00028 namespace cms{ 00029 00071 class CMS_API MapMessage : public Message { 00072 public: 00073 00074 virtual ~MapMessage() throw(); 00075 00083 virtual bool isEmpty() const = 0; 00084 00094 virtual std::vector< std::string > getMapNames() const = 0; 00095 00105 virtual bool itemExists( const std::string& name ) const = 0; 00106 00116 virtual bool getBoolean( const std::string& name ) const = 0; 00117 00129 virtual void setBoolean( const std::string& name, bool value ) = 0; 00130 00140 virtual unsigned char getByte( const std::string& name ) const = 0; 00141 00153 virtual void setByte( const std::string& name, unsigned char value ) = 0; 00154 00164 virtual std::vector<unsigned char> getBytes( const std::string& name ) const = 0; 00165 00177 virtual void setBytes( const std::string& name, 00178 const std::vector<unsigned char>& value ) = 0; 00179 00189 virtual char getChar( const std::string& name ) const = 0; 00190 00202 virtual void setChar( const std::string& name, char value ) = 0; 00203 00213 virtual double getDouble( const std::string& name ) const = 0; 00214 00226 virtual void setDouble( const std::string& name, double value ) = 0; 00227 00237 virtual float getFloat( const std::string& name ) const = 0; 00238 00250 virtual void setFloat( const std::string& name, float value ) = 0; 00251 00261 virtual int getInt( const std::string& name ) const = 0; 00262 00274 virtual void setInt( const std::string& name, int value ) = 0; 00275 00285 virtual long long getLong( const std::string& name ) const = 0; 00286 00298 virtual void setLong( const std::string& name, long long value ) = 0; 00299 00309 virtual short getShort( const std::string& name ) const = 0; 00310 00322 virtual void setShort( const std::string& name, short value ) = 0; 00323 00333 virtual std::string getString( const std::string& name ) const = 0; 00334 00346 virtual void setString( const std::string& name, const std::string& value ) = 0; 00347 00348 }; 00349 00350 } 00351 00352 #endif /*_CMS_MAPMESSAGE_H_*/