summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Gehring <juergen.gehring@bmw.de>2013-11-05 17:44:17 +0100
committerJuergen Gehring <juergen.gehring@bmw.de>2013-11-05 17:44:17 +0100
commit0c610740e43faeaccceb2fda18057d5286486892 (patch)
tree54942cd764bc428cda007d1e8415ca9b8397b427
parent7d9a0a36019cfb6dfac854e4b5ff6a0ad632ac98 (diff)
downloadgenivi-common-api-runtime-0c610740e43faeaccceb2fda18057d5286486892.tar.gz
Add templated input/output stream methods
for maps with three template parameters
-rw-r--r--src/CommonAPI/InputStream.h10
-rw-r--r--src/CommonAPI/OutputStream.h10
2 files changed, 16 insertions, 4 deletions
diff --git a/src/CommonAPI/InputStream.h b/src/CommonAPI/InputStream.h
index 6f3444e..a1987f2 100644
--- a/src/CommonAPI/InputStream.h
+++ b/src/CommonAPI/InputStream.h
@@ -277,11 +277,17 @@ private:
inputStream.beginReadVectorOfVectors();
}
- template<typename _InnerKeyType, typename _InnerValueType>
+ template<typename _InnerKeyType, typename _InnerValueType, typename _InnerHashType>
static inline void doBeginReadVector(InputStream& inputStream,
- const std::vector<std::unordered_map<_InnerKeyType, _InnerValueType>>& vectorValue) {
+ const std::vector<std::unordered_map<_InnerKeyType, _InnerValueType, _InnerHashType>>& vectorValue) {
inputStream.beginReadVectorOfMaps();
}
+
+ template<typename _InnerKeyType, typename _InnerValueType>
+ static inline void doBeginReadVector(InputStream& inputStream,
+ const std::vector<std::unordered_map<_InnerKeyType, _InnerValueType>>& vectorValue) {
+ inputStream.beginReadVectorOfMaps();
+ }
};
template<typename _VectorElementType, bool _IsSerializableStruct = false>
diff --git a/src/CommonAPI/OutputStream.h b/src/CommonAPI/OutputStream.h
index 92c7cd9..3cedf27 100644
--- a/src/CommonAPI/OutputStream.h
+++ b/src/CommonAPI/OutputStream.h
@@ -460,11 +460,17 @@ private:
outputStream.beginWriteVectorOfVectors(vectorValue.size());
}
- template<typename _InnerKeyType, typename _InnerValueType>
+ template<typename _InnerKeyType, typename _InnerValueType, typename _InnerHashType>
static inline void doBeginWriteVector(OutputStream& outputStream,
- const std::vector<std::unordered_map<_InnerKeyType, _InnerValueType>>& vectorValue) {
+ const std::vector<std::unordered_map<_InnerKeyType, _InnerValueType, _InnerHashType>>& vectorValue) {
outputStream.beginWriteVectorOfMaps(vectorValue.size());
}
+
+ template<typename _InnerKeyType, typename _InnerValueType>
+ static inline void doBeginWriteVector(OutputStream& outputStream,
+ const std::vector<std::unordered_map<_InnerKeyType, _InnerValueType>>& vectorValue) {
+ outputStream.beginWriteVectorOfMaps(vectorValue.size());
+ }
};
template<typename _VectorElementType, bool _IsSerializableStruct = false>