diff options
author | Jose <jose@zeroc.com> | 2015-12-01 17:36:19 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-12-01 17:36:19 +0100 |
commit | 2029ff368e49fae489b8ec8fc12f7d126b182dfb (patch) | |
tree | 6075d652b7851831c39e6f22004d8720864f1a60 /cpp/include/Ice/StreamHelpers.h | |
parent | The default LMDB map size for IceGrid and IceStorm is now 10MB (Windows) (diff) | |
download | ice-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.h | 21 |
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. |