8#ifdef ICE_CPP11_MAPPING
83 virtual std::shared_ptr<Value> _iceCloneImpl()
const = 0;
93template<
typename T,
typename Base>
class ValueHelper :
public Base
99 ValueHelper() =
default;
101 std::shared_ptr<T> ice_clone()
const
103 return std::static_pointer_cast<T>(_iceCloneImpl());
106 virtual std::string ice_id()
const override
108 return T::ice_staticId();
113 virtual std::shared_ptr<Value> _iceCloneImpl()
const override
115 return std::make_shared<T>(
static_cast<const T&
>(*
this));
118 virtual void _iceWriteImpl(Ice::OutputStream* os)
const override
120 os->
startSlice(T::ice_staticId(), -1, std::is_same<Base, Ice::Value>::value ?
true :
false);
121 Ice::StreamWriter<T, Ice::OutputStream>::write(os,
static_cast<const T&
>(*
this));
123 Base::_iceWriteImpl(os);
126 virtual void _iceReadImpl(Ice::InputStream* is)
override
129 Ice::StreamReader<T, Ice::InputStream>::read(is,
static_cast<T&
>(*
this));
131 Base::_iceReadImpl(is);
#define ICE_API
Definition Config.h:197
Interface for output streams used to create a sequence of bytes from Slice types.
Definition OutputStream.h:28
void startSlice(const std::string &typeId, int compactId, bool last)
Writes the start of a value or exception slice.
Definition OutputStream.h:285
void endSlice()
Marks the end of a value or exception slice.
Definition OutputStream.h:294
Value(const Value &)=default
virtual std::shared_ptr< SlicedData > ice_getSlicedData() const
Obtains the sliced data associated with this instance.
static const std::string & ice_staticId()
Obtains the Slice type ID of this type.
virtual void ice_preMarshal()
The Ice run time invokes this method prior to marshaling an object's data members.
Value & operator=(const Value &)=default
virtual std::string ice_id() const
Obtains the Slice type ID of the most-derived class supported by this object.
Value & operator=(Value &&)=default
std::shared_ptr< Value > ice_clone() const
Returns a shallow copy of the object.
virtual void ice_postUnmarshal()
The Ice run time invokes this method after unmarshaling an object's data members.
Definition BuiltinSequences.h:56