activemq-cpp-3.8.2
MapMessage.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _CMS_MAPMESSAGE_H_
19 #define _CMS_MAPMESSAGE_H_
20 
21 #include <cms/Config.h>
22 #include <cms/Message.h>
23 
24 #include <cms/CMSException.h>
27 
28 namespace cms {
29 
71  class CMS_API MapMessage: public Message {
72  public:
73 
74  virtual ~MapMessage();
75 
83  virtual bool isEmpty() const = 0;
84 
94  virtual std::vector<std::string> getMapNames() const = 0;
95 
105  virtual bool itemExists(const std::string& name) const = 0;
106 
120  virtual ValueType getValueType(const std::string& key) const = 0;
121 
131  virtual bool getBoolean(const std::string& name) const = 0;
132 
144  virtual void setBoolean(const std::string& name, bool value) = 0;
145 
155  virtual unsigned char getByte(const std::string& name) const = 0;
156 
168  virtual void setByte(const std::string& name, unsigned char value) = 0;
169 
179  virtual std::vector<unsigned char> getBytes(const std::string& name) const = 0;
180 
192  virtual void setBytes(const std::string& name, const std::vector<unsigned char>& value) = 0;
193 
203  virtual char getChar(const std::string& name) const = 0;
204 
216  virtual void setChar(const std::string& name, char value) = 0;
217 
227  virtual double getDouble(const std::string& name) const = 0;
228 
240  virtual void setDouble(const std::string& name, double value) = 0;
241 
251  virtual float getFloat(const std::string& name) const = 0;
252 
264  virtual void setFloat(const std::string& name, float value) = 0;
265 
275  virtual int getInt(const std::string& name) const = 0;
276 
288  virtual void setInt(const std::string& name, int value) = 0;
289 
299  virtual long long getLong(const std::string& name) const = 0;
300 
312  virtual void setLong(const std::string& name, long long value) = 0;
313 
323  virtual short getShort(const std::string& name) const = 0;
324 
336  virtual void setShort(const std::string& name, short value) = 0;
337 
347  virtual std::string getString(const std::string& name) const = 0;
348 
360  virtual void setString(const std::string& name, const std::string& value) = 0;
361 
362  };
363 
364 }
365 
366 #endif /*_CMS_MAPMESSAGE_H_*/
ValueType
Defines the Type Identifiers used to identify the type contained within a specific Message property o...
Definition: Message.h:112
Root of all messages.
Definition: Message.h:88
#define CMS_API
Definition: Config.h:31
A MapMessage object is used to send a set of name-value pairs.
Definition: MapMessage.h:71
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: DestinationResolver.h:23