activemq-cpp-3.8.2
CMSProperties.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 #ifndef _CMS_CMSPROPERTIES_H_
18 #define _CMS_CMSPROPERTIES_H_
19 
20 #include <cms/Config.h>
21 
22 #include <map>
23 #include <string>
24 #include <vector>
25 
26 namespace cms {
27 
35  public:
36 
37  virtual ~CMSProperties();
38 
45  virtual int size() const = 0;
46 
52  virtual bool isEmpty() const = 0;
53 
62  virtual const char* getProperty(const std::string& name) const = 0;
63 
74  virtual std::string getProperty(const std::string& name, const std::string& defaultValue) const = 0;
75 
85  virtual void setProperty(const std::string& name, const std::string& value) = 0;
86 
94  virtual bool hasProperty(const std::string& name) const = 0;
95 
106  virtual std::string remove(const std::string& name) = 0;
107 
114  virtual std::vector<std::string> propertyNames() const = 0;
115 
123  virtual std::vector< std::pair< std::string, std::string > > toArray() const = 0;
124 
131  virtual void copy(const CMSProperties* source) = 0;
132 
138  virtual CMSProperties* clone() const = 0;
139 
143  virtual void clear() = 0;
144 
151  virtual std::string toString() const = 0;
152 
153  };
154 
155 }
156 
157 #endif /*_CMS_CMSPROPERTIES_H_*/
#define CMS_API
Definition: Config.h:31
Interface for a Java-like properties object.
Definition: CMSProperties.h:34
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: DestinationResolver.h:23