Apache Log4cxx  Version 1.3.1
Loading...
Searching...
No Matches
properties.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 _LOG4CXX_HELPER_PROPERTIES_H
19#define _LOG4CXX_HELPER_PROPERTIES_H
20
21#include <log4cxx/logstring.h>
24#include <map>
25#include <vector>
26#include <istream>
27
28namespace LOG4CXX_NS
29{
30namespace helpers
31{
32class LOG4CXX_EXPORT Properties
33{
34 private:
35 typedef std::map<LogString, LogString> PropertyMap;
36 PropertyMap* properties;
37 Properties(const Properties&);
38 Properties& operator=(const Properties&);
39
40 public:
126 void load(InputStreamPtr inStream);
127
135 LogString setProperty(const LogString& key, const LogString& value);
143 LogString put(const LogString& key, const LogString& value);
144
145
152 LogString getProperty(const LogString& key) const;
159 LogString get(const LogString& key) const;
160
169 std::vector<LogString> propertyNames() const;
170}; // class Properties
171} // namespace helpers
172} // namespace log4cxx
173
174
175#endif //_LOG4CXX_HELPER_PROPERTIES_H
Definition: properties.h:33
std::vector< LogString > propertyNames() const
Returns an enumeration of all the keys in this property list, including distinct keys in the default ...
LogString setProperty(const LogString &key, const LogString &value)
Calls Properties::put.
LogString get(const LogString &key) const
Gets a property value.
void load(InputStreamPtr inStream)
Reads a property list (key and element pairs) from the input stream.
LogString put(const LogString &key, const LogString &value)
Puts a property value into the collection.
LogString getProperty(const LogString &key) const
Calls Properties::get.
Properties()
Create new instance.
std::basic_string< logchar > LogString
Definition: logstring.h:60