1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-19 12:07:13 +01:00
SqMod/vendor/POCO/Util/include/Poco/Util/MapConfiguration.h
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

65 lines
1.4 KiB
C++

//
// MapConfiguration.h
//
// Library: Util
// Package: Configuration
// Module: MapConfiguration
//
// Definition of the MapConfiguration class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_MapConfiguration_INCLUDED
#define Util_MapConfiguration_INCLUDED
#include "Poco/Util/Util.h"
#include "Poco/Util/AbstractConfiguration.h"
#include <map>
namespace Poco {
namespace Util {
class Util_API MapConfiguration: public AbstractConfiguration
/// An implementation of AbstractConfiguration that stores configuration data in a map.
{
public:
MapConfiguration();
/// Creates an empty MapConfiguration.
void copyTo(AbstractConfiguration& config);
/// Copies all configuration properties to the given configuration.
void clear();
/// Clears the configuration.
protected:
typedef std::map<std::string, std::string> StringMap;
typedef StringMap::const_iterator iterator;
bool getRaw(const std::string& key, std::string& value) const;
void setRaw(const std::string& key, const std::string& value);
void enumerate(const std::string& key, Keys& range) const;
void removeRaw(const std::string& key);
~MapConfiguration();
iterator begin() const;
iterator end() const;
private:
StringMap _map;
};
} } // namespace Poco::Util
#endif // Util_MapConfiguration_INCLUDED