1 // Copyright (C) 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_SELECTIVE_OPTION_IMPL_HPP
7 #define VSOMEIP_V3_SD_SELECTIVE_OPTION_IMPL_HPP
8 
9 #include <set>
10 
11 #include <vsomeip/primitive_types.hpp>
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 selective_option_impl: public option_impl {
23 
24 public:
25     selective_option_impl();
26     virtual ~selective_option_impl();
27 
28     bool operator==(const option_impl &_other) const;
29 
30     std::set<client_t> get_clients() const;
31     void set_clients(const std::set<client_t> &_clients);
32     bool add_client(client_t _client);
33     bool remove_client(client_t _client);
34     bool has_clients() const;
35     bool has_client(client_t _client);
36 
37     bool serialize(vsomeip_v3::serializer *_to) const;
38     bool deserialize(vsomeip_v3::deserializer *_from);
39 
40 private:
41     std::set<client_t> clients_;
42 };
43 
44 } // namespace sd
45 } // namespace vsomeip_v3
46 
47 #endif // VSOMEIP_V3_SD_SELECTIVE_OPTION_IMPL_HPP
48