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/Value.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/Value.h')
-rw-r--r-- | cpp/include/Ice/Value.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/cpp/include/Ice/Value.h b/cpp/include/Ice/Value.h new file mode 100644 index 00000000000..4d66fe4fd33 --- /dev/null +++ b/cpp/include/Ice/Value.h @@ -0,0 +1,62 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICE_VALUE_H +#define ICE_VALUE_H + +#ifdef ICE_CPP11_MAPPING // C++11 mapping + +#include <Ice/ValueF.h> +#include <Ice/StreamF.h> + +namespace IceInternal +{ + +class BasicStream; + +} + +namespace Ice +{ + +class ICE_API Value +{ +public: + + virtual ~Value() = default; + + virtual void ice_preMarshal(); + virtual void ice_postUnmarshal(); + + virtual void __write(IceInternal::BasicStream*) const; + virtual void __read(IceInternal::BasicStream*); + + virtual const std::string& ice_id() const; + static const std::string& ice_staticId(); + +protected: + + virtual void __writeImpl(IceInternal::BasicStream*) const {} + virtual void __readImpl(IceInternal::BasicStream*) {} +}; + +template<typename T> +struct ICE_API InterfaceTraits +{ + static const int compactId = -1; + static const std::string staticId; +}; + +ICE_API void ice_writeObject(const OutputStreamPtr&, const ValuePtr&); +ICE_API void ice_readObject(const InputStreamPtr&, ValuePtr&); + +} +#endif // C++11 mapping end + +#endif |