Ice 3.7 C++11 API Reference
|
Go to the documentation of this file.
8 #ifdef ICE_CPP11_MAPPING // C++11 mapping
83 virtual std::shared_ptr<Value> _iceCloneImpl()
const = 0;
93 template<
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));
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);
129 Ice::StreamReader<T, Ice::InputStream>::read(is,
static_cast<T&
>(*
this));
131 Base::_iceReadImpl(is);
137 #endif // C++11 mapping end
std::shared_ptr< Value > ice_clone() const
Returns a shallow copy of the object.
Value & operator=(const Value &)=default
void endSlice()
Marks the end of a value or exception slice.
Definition: OutputStream.h:294
Value(const Value &)=default
#define ICE_API
Definition: Config.h:197
The base class for instances of Slice classes.
Definition: Value.h:24
virtual void ice_preMarshal()
The Ice run time invokes this method prior to marshaling an object's data members.
virtual std::string ice_id() const
Obtains the Slice type ID of the most-derived class supported by this object.
Interface for output streams used to create a sequence of bytes from Slice types.
Definition: OutputStream.h:28
virtual void ice_postUnmarshal()
The Ice run time invokes this method after unmarshaling an object's data members.
void startSlice(const std::string &typeId, int compactId, bool last)
Writes the start of a value or exception slice.
Definition: OutputStream.h:285
Definition: BuiltinSequences.h:56
Value & operator=(Value &&)=default
static const std::string & ice_staticId()
Obtains the Slice type ID of this type.
virtual std::shared_ptr< SlicedData > ice_getSlicedData() const
Obtains the sliced data associated with this instance.