File indexing completed on 2026-06-02 08:43:50
0001 #ifndef PARAMETERS_H
0002 #define PARAMETERS_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <stddef.h>
0012 #include <map>
0013 #include <string>
0014
0015 #include "Parameter.h"
0016
0017 namespace ElemUtils {
0018
0019
0020
0021
0022
0023
0024
0025 class Parameters {
0026 public:
0027 Parameters();
0028 Parameters(const std::string &key, const GenericType &value);
0029 Parameters(const Parameter ¶meter);
0030 virtual ~Parameters();
0031
0032 void add(const std::string &key, const GenericType &value);
0033 void add(const Parameter ¶meter);
0034 void add(const Parameters ¶meters);
0035
0036 bool isAvailable(const std::string ¶meterName) const;
0037
0038 size_t size() const;
0039
0040 void clear();
0041
0042 Parameter operator()(const std::string &key) const;
0043
0044 virtual std::string toString() const;
0045
0046 bool update(const std::string &key, const GenericType &value);
0047 bool update(const std::string &key, const Parameter ¶meter);
0048 bool remove(const std::string &key);
0049
0050 const Parameter& get(const std::string &key) const;
0051 const Parameter& getLastAvailable() const;
0052
0053 std::string key(size_t index) const;
0054 std::string stringValue(size_t index) const;
0055
0056 private:
0057
0058 std::map<std::string, Parameter> m_parameters;
0059
0060 mutable std::map<std::string, Parameter>::const_iterator m_it;
0061 };
0062
0063 }
0064
0065 #endif