00001
#ifndef PROPERTIES_H
00002
#define PROPERTIES_H
00003
00004
#include <map>
00005
#include <string>
00006
#include <vector>
00007
#include <memory>
00008
#include <stdexcept>
00009
00010
namespace acsalarm
00011 {
00012 typedef std::map< std::string, std::string >::value_type
PropertyMapEntryType;
00013
00014
00015
00016
00017 class Properties
00018 {
00019
private:
00020
00021 std::map<std::string, std::string>
propertiesMap;
00022
00023
public:
00024
00025
00026
Properties();
00027
Properties(
const Properties &);
00028
00029
00030
virtual ~Properties();
00031
00032
00033
Properties &
operator=(
const Properties & rhs);
00034
00035
00036
int operator==(
const Properties &rhs)
const;
00037
00038
00039 std::string
getProperty(std::string key);
00040
00041
00042
00043
00044 std::auto_ptr<std::vector<std::string> >
propertyNames();
00045
00046
00047
void setProperty(std::string key, std::string value)
throw(std::invalid_argument);
00048
00049
00050
00051
00052
00053 std::string
toXML(
int amountToIndent = 6);
00054 };
00055 }
00056
#endif