|
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 #ifndef _CMS_CMSPROPERTIES_H_ 00018 #define _CMS_CMSPROPERTIES_H_ 00019 00020 #include <cms/Config.h> 00021 00022 #include <map> 00023 #include <string> 00024 #include <vector> 00025 00026 namespace cms{ 00027 00034 class CMS_API CMSProperties { 00035 public: 00036 00037 virtual ~CMSProperties() throw(); 00038 00045 virtual int size() const = 0; 00046 00052 virtual bool isEmpty() const = 0; 00053 00062 virtual const char* getProperty( const std::string& name ) const = 0; 00063 00074 virtual std::string getProperty( const std::string& name, 00075 const std::string& defaultValue ) const = 0; 00076 00086 virtual void setProperty( const std::string& name, 00087 const std::string& value ) = 0; 00088 00096 virtual bool hasProperty( const std::string& name ) const = 0; 00097 00108 virtual std::string remove( const std::string& name ) = 0; 00109 00116 virtual std::vector<std::string> propertyNames() const = 0; 00117 00125 virtual std::vector< std::pair< std::string, std::string > > toArray() const = 0; 00126 00133 virtual void copy( const CMSProperties* source ) = 0; 00134 00140 virtual CMSProperties* clone() const = 0; 00141 00145 virtual void clear() = 0; 00146 00153 virtual std::string toString() const = 0; 00154 00155 }; 00156 00157 } 00158 00159 #endif /*_CMS_CMSPROPERTIES_H_*/