activemq-cpp-3.6.0
Main Page
Namespaces
Data Structures
Files
File List
Globals
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 _DECAF_UTIL_PROPERTIES_H_
19
#define _DECAF_UTIL_PROPERTIES_H_
20
21
#include <vector>
22
#include <string>
23
#include <
decaf/util/Config.h
>
24
#include <
decaf/util/StlMap.h
>
25
#include <
decaf/io/InputStream.h
>
26
#include <
decaf/io/OutputStream.h
>
27
#include <
decaf/lang/Pointer.h
>
28
#include <
decaf/lang/exceptions/IllegalArgumentException.h
>
29
#include <
decaf/lang/exceptions/NullPointerException.h
>
30
#include <
decaf/io/IOException.h
>
31
32
namespace
decaf{
33
namespace
io{
34
class
Reader;
35
class
Writer;
36
}
37
namespace
util{
38
39
class
PropertiesInternal;
40
53
class
DECAF_API
Properties
{
54
private
:
55
56
PropertiesInternal*
internal
;
57
58
protected
:
59
64
decaf::lang::Pointer<Properties>
defaults
;
65
66
public
:
67
68
Properties
();
69
70
Properties
(
const
Properties
& src );
71
72
virtual
~
Properties
();
73
82
Properties
& operator= (
const
Properties
& src );
83
89
bool
isEmpty()
const
;
90
94
int
size()
const
;
95
105
const
char
* getProperty(
const
std::string& name )
const
;
106
118
std::string getProperty(
const
std::string& name,
const
std::string& defaultValue )
const
;
119
131
std::string setProperty(
const
std::string& name,
const
std::string& value );
132
141
bool
hasProperty(
const
std::string& name )
const
;
142
151
std::string
remove
(
const
std::string& name );
152
161
std::vector<std::string> propertyNames()
const
;
162
169
std::vector< std::pair< std::string, std::string > > toArray()
const
;
170
178
void
copy(
const
Properties
& source );
179
185
Properties
* clone()
const
;
186
190
void
clear();
191
204
bool
equals(
const
Properties
& source )
const
;
205
211
std::string toString()
const
;
212
227
void
load(
decaf::io::InputStream
* stream );
228
328
void
load(
decaf::io::Reader
* reader );
329
358
void
store(
decaf::io::OutputStream
* out,
const
std::string& comment );
359
396
void
store(
decaf::io::Writer
* writer,
const
std::string& comments );
397
398
private
:
399
400
void
selectProperties(
decaf::util::StlMap<std::string, std::string>
& selectProperties )
const
;
401
402
};
403
404
}}
405
406
#endif
/*_DECAF_UTIL_PROPERTIES_H_*/
src
main
decaf
util
Properties.h
Generated on Mon Mar 4 2013 10:25:46 for activemq-cpp-3.6.0 by
1.8.1.2