summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/StreamHelpers.h
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-12-01 17:36:19 +0100
committerJose <jose@zeroc.com>2015-12-01 17:36:19 +0100
commit2029ff368e49fae489b8ec8fc12f7d126b182dfb (patch)
tree6075d652b7851831c39e6f22004d8720864f1a60 /cpp/include/Ice/StreamHelpers.h
parentThe default LMDB map size for IceGrid and IceStorm is now 10MB (Windows) (diff)
downloadice-2029ff368e49fae489b8ec8fc12f7d126b182dfb.tar.bz2
ice-2029ff368e49fae489b8ec8fc12f7d126b182dfb.tar.xz
ice-2029ff368e49fae489b8ec8fc12f7d126b182dfb.zip
C++11 mapping initial commit
Diffstat (limited to 'cpp/include/Ice/StreamHelpers.h')
-rw-r--r--cpp/include/Ice/StreamHelpers.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/include/Ice/StreamHelpers.h b/cpp/include/Ice/StreamHelpers.h
index 9ffd6634b60..10bd6e723af 100644
--- a/cpp/include/Ice/StreamHelpers.h
+++ b/cpp/include/Ice/StreamHelpers.h
@@ -14,6 +14,7 @@
#include <IceUtil/Iterator.h>
#include <Ice/ObjectF.h>
+#include <Ice/Traits.h>
namespace Ice
{
@@ -233,6 +234,15 @@ struct StreamableTraits< ::std::vector<bool> >
};
+#ifdef ICE_CPP11_MAPPING
+template<typename T>
+struct StreamableTraits<::std::shared_ptr<T>, typename ::std::enable_if<IsProxy<T>::value>::type>
+{
+ static const StreamHelperCategory helper = StreamHelperCategoryProxy;
+ static const int minWireSize = 2;
+ static const bool fixedLength = false;
+};
+#else
template<typename T>
struct StreamableTraits< ::IceInternal::ProxyHandle<T> >
{
@@ -240,7 +250,17 @@ struct StreamableTraits< ::IceInternal::ProxyHandle<T> >
static const int minWireSize = 2;
static const bool fixedLength = false;
};
+#endif
+#ifdef ICE_CPP11_MAPPING
+template<typename T>
+struct StreamableTraits<::std::shared_ptr<T>, typename ::std::enable_if<IsValue<T>::value>::type>
+{
+ static const StreamHelperCategory helper = StreamHelperCategoryClass;
+ static const int minWireSize = 1;
+ static const bool fixedLength = false;
+};
+#else
template<typename T>
struct StreamableTraits< ::IceInternal::Handle<T> >
{
@@ -248,6 +268,7 @@ struct StreamableTraits< ::IceInternal::Handle<T> >
static const int minWireSize = 1;
static const bool fixedLength = false;
};
+#endif
//
// StreamHelper templates used by streams to read and write data.