3#ifndef ICE_SLICED_DATA_H
4#define ICE_SLICED_DATA_H
7#include "SlicedDataF.h"
14# pragma clang diagnostic push
15# pragma clang diagnostic ignored "-Wshadow-field-in-constructor"
16#elif defined(__GNUC__)
17# pragma GCC diagnostic push
18# pragma GCC diagnostic ignored "-Wshadow"
34 const std::vector<std::byte>
bytes;
54 std::vector<std::byte>
bytes,
65 assert(!this->typeId.empty());
69 assert(this->typeId.empty());
101 [[nodiscard]]
const char*
ice_id() const noexcept final;
107 return std::static_pointer_cast<UnknownSlicedValue>(_iceCloneImpl());
113 [[nodiscard]]
ValuePtr _iceCloneImpl() const final;
115 std::
string _unknownTypeId;
119#if defined(__clang__)
120# pragma clang diagnostic pop
121#elif defined(__GNUC__)
122# pragma GCC diagnostic pop
void clear()
Clears the slices to break potential cyclic references.
const SliceInfoSeq slices
The slices of the unknown class.
SlicedData(SliceInfoSeq slices) noexcept
Constructs a SlicedData instance with the given slices.
void ice_printFields(std::ostream &os) const final
Outputs the name and value of each field of this instance, including inherited fields,...
const char * ice_id() const noexcept final
Returns the Slice type ID associated with this instance.
UnknownSlicedValuePtr ice_clone() const
Clones this object.
UnknownSlicedValue(std::string unknownTypeId) noexcept
Constructs the placeholder instance.
Value() noexcept=default
Default constructor.
std::vector< SliceInfoPtr > SliceInfoSeq
The slices of unknown types.
std::shared_ptr< Value > ValuePtr
A shared pointer to a Value.
std::shared_ptr< UnknownSlicedValue > UnknownSlicedValuePtr
A shared pointer to an UnknownSlicedValue.
std::vector< ValuePtr > instances
The class instances referenced by this slice.
SliceInfo(std::string typeId, int compactId, std::vector< std::byte > bytes, bool hasOptionalMembers, bool isLastSlice) noexcept
Constructs a new SliceInfo instance.
const std::vector< std::byte > bytes
The encoded bytes for this slice, including the leading size integer.
const bool hasOptionalMembers
Whether or not the slice contains optional members.
const std::string typeId
The Slice type ID for this slice. It's empty when the compact ID is set (not -1).
const bool isLastSlice
Whether or not this is the last slice.
const int compactId
The Slice compact type ID for this slice. No compact ID is encoded as -1.