2 Copyright (c) 2018-2019 Nokia.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
18 * This source code is part of the near-RT RIC (RAN Intelligent Controller)
19 * platform project (RICP).
22 #ifndef SHAREDDATALAYER_REDIS_CONTENTSBUILDER_HPP_
23 #define SHAREDDATALAYER_REDIS_CONTENTSBUILDER_HPP_
25 #include "private/asyncconnection.hpp"
27 namespace shareddatalayer
36 ContentsBuilder(const char nsKeySeparator);
38 ContentsBuilder(const ContentsBuilder&) = delete;
40 ContentsBuilder& operator = (const ContentsBuilder&) = delete;
42 virtual ~ContentsBuilder();
44 virtual Contents build(const std::string& string) const;
46 virtual Contents build(const std::string& string,
47 const std::string& string2) const;
49 virtual Contents build(const std::string& string,
50 const std::string& string2,
51 const std::string& string3) const;
53 virtual Contents build(const std::string& string,
54 const AsyncConnection::Namespace& ns,
55 const AsyncConnection::DataMap& dataMap) const;
57 virtual Contents build(const std::string& string,
58 const AsyncConnection::Namespace& ns,
59 const AsyncConnection::DataMap& dataMap,
60 const std::string& string2,
61 const std::string& string3) const;
63 virtual Contents build(const std::string& string,
64 const AsyncConnection::Namespace& ns,
65 const AsyncConnection::Key& key,
66 const AsyncConnection::Data& data) const;
68 virtual Contents build(const std::string& string,
69 const AsyncConnection::Namespace& ns,
70 const AsyncConnection::Key& key,
71 const AsyncConnection::Data& data,
72 const std::string& string2,
73 const std::string& string3) const;
75 virtual Contents build(const std::string& string,
76 const AsyncConnection::Namespace& ns,
77 const AsyncConnection::Key& key,
78 const AsyncConnection::Data& data,
79 const AsyncConnection::Data& data2) const;
81 virtual Contents build(const std::string& string,
82 const AsyncConnection::Namespace& ns,
83 const AsyncConnection::Key& key,
84 const AsyncConnection::Data& data,
85 const AsyncConnection::Data& data2,
86 const std::string& string2,
87 const std::string& string3) const;
89 virtual Contents build(const std::string& string,
90 const AsyncConnection::Namespace& ns,
91 const AsyncConnection::Keys& keys) const;
93 virtual Contents build(const std::string& string,
94 const AsyncConnection::Namespace& ns,
95 const AsyncConnection::Keys& keys,
96 const std::string& string2,
97 const std::string& string3) const;
100 const char nsKeySeparator;
102 void addString(Contents& contents,
103 const std::string& string) const;
105 void addDataMap(Contents& contents,
106 const AsyncConnection::Namespace& ns,
107 const AsyncConnection::DataMap& dataMap) const;
109 void addKey(Contents& contents,
110 const AsyncConnection::Namespace& ns,
111 const AsyncConnection::Key& key) const;
113 void addData(Contents& contents,
114 const AsyncConnection::Data& data) const;
116 void addKeys(Contents& contents,
117 const AsyncConnection::Namespace& ns,
118 const AsyncConnection::Keys& keys) const;