• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2014-2018 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
2 // This Source Code Form is subject to the terms of the Mozilla Public
3 // License, v. 2.0. If a copy of the MPL was not distributed with this
4 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 
6 #ifndef VSOMEIP_V3_SD_CONFIGURATION_OPTION_IMPL_HPP_
7 #define VSOMEIP_V3_SD_CONFIGURATION_OPTION_IMPL_HPP_
8 
9 #include <map>
10 #include <string>
11 #include <vector>
12 
13 #include "option_impl.hpp"
14 
15 namespace vsomeip_v3 {
16 
17 class serializer;
18 class deserializer;
19 
20 namespace sd {
21 
22 class configuration_option_impl: public option_impl {
23 
24 public:
25     configuration_option_impl();
26     virtual ~configuration_option_impl();
27 
28     bool operator==(const option_impl &_other) const;
29 
30     void add_item(const std::string &_key, const std::string &_value);
31     void remove_item(const std::string &_key);
32 
33     std::vector<std::string> get_keys() const;
34     std::vector<std::string> get_values() const;
35     std::string get_value(const std::string &_key) const;
36 
37     bool serialize(vsomeip_v3::serializer *_to) const;
38     bool deserialize(vsomeip_v3::deserializer *_from);
39 
40 private:
41     std::map<std::string, std::string> configuration_;
42 };
43 
44 } // namespace sd
45 } // namespace vsomeip_v3
46 
47 #endif // VSOMEIP_V3_SD_CONFIGURATION_OPTION_IMPL_HPP_
48