Zserio C++ runtime library
1.1.0
Built for Zserio 2.15.0
|
#include <IReflectable.h>
Public Types | |
using | Ptr = std::shared_ptr< IBasicReflectable > |
using | ConstPtr = std::shared_ptr< const IBasicReflectable > |
Public Member Functions | |
virtual | ~IBasicReflectable ()=default |
virtual const IBasicTypeInfo< ALLOC > & | getTypeInfo () const =0 |
virtual bool | isArray () const =0 |
virtual void | initializeChildren ()=0 |
virtual void | initialize (const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments)=0 |
virtual size_t | initializeOffsets (size_t bitPosition)=0 |
virtual size_t | initializeOffsets ()=0 |
virtual size_t | bitSizeOf (size_t bitPosition) const =0 |
virtual size_t | bitSizeOf () const =0 |
virtual void | write (BitStreamWriter &writer) const =0 |
virtual void | setField (StringView name, const AnyHolder< ALLOC > &value)=0 |
virtual Ptr | createField (StringView name)=0 |
virtual StringView | getChoice () const =0 |
virtual size_t | size () const =0 |
virtual void | resize (size_t size)=0 |
virtual void | setAt (const AnyHolder< ALLOC > &value, size_t index)=0 |
virtual void | append (const AnyHolder< ALLOC > &value)=0 |
virtual bool | getBool () const =0 |
virtual int8_t | getInt8 () const =0 |
virtual int16_t | getInt16 () const =0 |
virtual int32_t | getInt32 () const =0 |
virtual int64_t | getInt64 () const =0 |
virtual uint8_t | getUInt8 () const =0 |
virtual uint16_t | getUInt16 () const =0 |
virtual uint32_t | getUInt32 () const =0 |
virtual uint64_t | getUInt64 () const =0 |
virtual float | getFloat () const =0 |
virtual double | getDouble () const =0 |
virtual Span< const uint8_t > | getBytes () const =0 |
virtual StringView | getStringView () const =0 |
virtual const BasicBitBuffer< ALLOC > & | getBitBuffer () const =0 |
virtual int64_t | toInt () const =0 |
virtual uint64_t | toUInt () const =0 |
virtual double | toDouble () const =0 |
virtual const ParsingInfo & | parsingInfo () const =0 |
virtual ConstPtr | getField (StringView name) const =0 |
virtual Ptr | getField (StringView name)=0 |
virtual ConstPtr | getParameter (StringView name) const =0 |
virtual Ptr | getParameter (StringView name)=0 |
virtual ConstPtr | callFunction (StringView name) const =0 |
virtual Ptr | callFunction (StringView name)=0 |
virtual ConstPtr | find (StringView path) const =0 |
virtual Ptr | find (StringView path)=0 |
virtual ConstPtr | operator[] (StringView path) const =0 |
virtual Ptr | operator[] (StringView path)=0 |
virtual ConstPtr | at (size_t index) const =0 |
virtual Ptr | at (size_t index)=0 |
virtual ConstPtr | operator[] (size_t index) const =0 |
virtual Ptr | operator[] (size_t index)=0 |
virtual AnyHolder< ALLOC > | getAnyValue (const ALLOC &allocator) const =0 |
virtual AnyHolder< ALLOC > | getAnyValue (const ALLOC &allocator)=0 |
virtual AnyHolder< ALLOC > | getAnyValue () const =0 |
virtual AnyHolder< ALLOC > | getAnyValue ()=0 |
virtual string< ALLOC > | toString (const ALLOC &allocator) const =0 |
virtual string< ALLOC > | toString () const =0 |
Interface for reflectable view to instances of zserio objects.
Definition at line 32 of file IReflectable.h.
using zserio::IBasicReflectable< ALLOC >::ConstPtr = std::shared_ptr<const IBasicReflectable> |
Shared pointer to the constant reflectable interface.
Definition at line 39 of file IReflectable.h.
using zserio::IBasicReflectable< ALLOC >::Ptr = std::shared_ptr<IBasicReflectable> |
Shared pointer to the reflectable interface.
Definition at line 36 of file IReflectable.h.
|
virtualdefault |
Destructor.
|
pure virtual |
Appends an element at the given index within the reflected array.
value | Value to append. |
CppRuntimeException | When the reflected object is not an array. |
Implemented in zserio::EnumReflectableArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableArray< ALLOC, RAW_ARRAY >, zserio::DynamicBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::ReflectableConstArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reflectable view to an array element.
CppRuntimeException | When the reflected object is not an array or when the given index is out of bounds of the underlying array. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::EnumReflectableArray< ALLOC, RAW_ARRAY >, zserio::EnumReflectableConstArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableConstArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableConstArray< ALLOC, RAW_ARRAY >, zserio::DynamicBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::DynamicBitFieldReflectableConstArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableConstArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableConstArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reflectable view to an array element.
CppRuntimeException | When the reflected object is not an array or when the given index is out of bounds of the underlying array. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::EnumReflectableArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableArray< ALLOC, RAW_ARRAY >, zserio::DynamicBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::ReflectableConstArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets the number of bits needed for serialization of the reflected object.
The bit stream position to be used for calculation is defaulted to zero.
CppRuntimeException | When the reflected object is an array. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets the number of bits needed for serialization of the reflected object.
bitPosition | The bit stream position to be used for calculation. |
CppRuntimeException | When the reflected object is an array. |
Implemented in zserio::BitBufferReflectable< ALLOC >, zserio::StringReflectable< ALLOC >, zserio::BytesReflectable< ALLOC >, zserio::Float64Reflectable< ALLOC >, zserio::Float32Reflectable< ALLOC >, zserio::Float16Reflectable< ALLOC >, zserio::VarSizeReflectable< ALLOC >, zserio::VarUIntReflectable< ALLOC >, zserio::VarUInt64Reflectable< ALLOC >, zserio::VarUInt32Reflectable< ALLOC >, zserio::VarUInt16Reflectable< ALLOC >, zserio::VarIntReflectable< ALLOC >, zserio::VarInt64Reflectable< ALLOC >, zserio::VarInt32Reflectable< ALLOC >, zserio::VarInt16Reflectable< ALLOC >, zserio::DynamicUnsignedBitFieldReflectable< ALLOC, uint64_t >, zserio::DynamicUnsignedBitFieldReflectable< ALLOC, uint32_t >, zserio::DynamicUnsignedBitFieldReflectable< ALLOC, uint16_t >, zserio::DynamicUnsignedBitFieldReflectable< ALLOC, uint8_t >, zserio::DynamicSignedBitFieldReflectable< ALLOC, int64_t >, zserio::DynamicSignedBitFieldReflectable< ALLOC, int32_t >, zserio::DynamicSignedBitFieldReflectable< ALLOC, int16_t >, zserio::DynamicSignedBitFieldReflectable< ALLOC, int8_t >, zserio::FixedUnsignedBitFieldReflectable< ALLOC, uint64_t >, zserio::FixedUnsignedBitFieldReflectable< ALLOC, uint32_t >, zserio::FixedUnsignedBitFieldReflectable< ALLOC, uint16_t >, zserio::FixedUnsignedBitFieldReflectable< ALLOC, uint8_t >, zserio::FixedSignedBitFieldReflectable< ALLOC, int64_t >, zserio::FixedSignedBitFieldReflectable< ALLOC, int32_t >, zserio::FixedSignedBitFieldReflectable< ALLOC, int16_t >, zserio::FixedSignedBitFieldReflectable< ALLOC, int8_t >, zserio::UInt64Reflectable< ALLOC >, zserio::UInt32Reflectable< ALLOC >, zserio::UInt16Reflectable< ALLOC >, zserio::UInt8Reflectable< ALLOC >, zserio::Int64Reflectable< ALLOC >, zserio::Int32Reflectable< ALLOC >, zserio::Int16Reflectable< ALLOC >, zserio::Int8Reflectable< ALLOC >, zserio::BoolReflectable< ALLOC >, zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Calls function with the given name on the reflected zserio object and gets reflectable view to its result.
name | Function schema name. |
CppRuntimeException | When the reflected object is not a compound type or when the function with the given name doesn't exist or the the function call itself throws. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Calls function with the given name on the reflected zserio object and gets reflectable view to its result.
name | Function schema name. |
CppRuntimeException | When the reflected object is not a compound type or when the function with the given name doesn't exist or the the function call itself throws. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::ReflectableConstAllocatorHolderBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Creates a default constructed field within current object and returns reflectable pointer to it.
name | Name of the optional field to create. |
CppRuntimeException | When the reflected object is not a compound type or when the field with the given name doesn't exists. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Universal accessor to zserio entities within the zserio sub-tree represented by the reflected object.
Supports dot notation corresponding to the tree defined in zserio language. Can access fields or parameters or call functions within the zserio sub-tree.
Examples:
path | Dot notation corresponding to the zserio tree. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Universal accessor to zserio entities within the zserio sub-tree represented by the reflected object.
Supports dot notation corresponding to the tree defined in zserio language. Can access fields or parameters or call functions within the zserio sub-tree.
Examples:
path | Dot notation corresponding to the zserio tree. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets any value within the reflected object.
For builtin types, enums and bitmasks the value is "returned by value" - i.e. it's copied into the any holder, but note that for bytes the any holder contains Span, for string the any holder contains an appropriate StringView and for compounds, bit buffers and arrays the value is "returned by reference" - i.e. the any holder contains std::reference_wrapper<T> with the reference to the compound type or the raw array type.
allocator | Allocator to use for the value allocation. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets any value within the reflected object.
For builtin types, enums and bitmasks the value is "returned by value" - i.e. it's copied into the any holder, but note that for bytes the any holder contains Span, for string the any holder contains an appropriate StringView and for compounds, bit buffers and arrays the value is "returned by reference" - i.e. the any holder contains std::reference_wrapper<T> with the reference to the compound type or the raw array type.
allocator | Allocator to use for the value allocation. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets any value within the reflected object.
For builtin types, enums and bitmasks the value is "returned by value" - i.e. it's copied into the any holder, but note that for bytes the any holder contains Span, for string the any holder contains an appropriate StringView and for compounds, bit buffers and arrays the value is "returned by reference" - i.e. the any holder contains std::reference_wrapper<T> with the reference to the compound type or the raw array type.
allocator | Allocator to use for the value allocation. |
Implemented in zserio::EnumReflectableArray< ALLOC, RAW_ARRAY >, zserio::EnumReflectableConstArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableConstArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableConstArray< ALLOC, RAW_ARRAY >, zserio::DynamicBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::DynamicBitFieldReflectableConstArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableConstArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableConstArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableBase< ALLOC, T, typename std::enable_if< std::is_arithmetic< T >::value||std::is_same< T, StringView >::value||is_span< T >::value >::type >, zserio::BuiltinReflectableBase< ALLOC, T, typename >, zserio::BuiltinReflectableBase< ALLOC, StringView >, zserio::BuiltinReflectableBase< ALLOC, Span< const uint8_t > >, zserio::BuiltinReflectableBase< ALLOC, BasicBitBuffer< ALLOC > >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets any value within the reflected object.
For builtin types, enums and bitmasks the value is "returned by value" - i.e. it's copied into the any holder, but note that for bytes the any holder contains Span, for string the any holder contains an appropriate StringView and for compounds, bit buffers and arrays the value is "returned by reference" - i.e. the any holder contains std::reference_wrapper<T> with the reference to the compound type or the raw array type.
allocator | Allocator to use for the value allocation. |
Implemented in zserio::EnumReflectableArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableArray< ALLOC, RAW_ARRAY >, zserio::DynamicBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::ReflectableConstArrayBase< ALLOC >, zserio::ReflectableConstAllocatorHolderBase< ALLOC >, zserio::BuiltinReflectableBase< ALLOC, T, typename std::enable_if< std::is_arithmetic< T >::value||std::is_same< T, StringView >::value||is_span< T >::value >::type >, zserio::BuiltinReflectableBase< ALLOC, T, typename >, zserio::BuiltinReflectableBase< ALLOC, StringView >, zserio::BuiltinReflectableBase< ALLOC, Span< const uint8_t > >, zserio::BuiltinReflectableBase< ALLOC, BasicBitBuffer< ALLOC > >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reference to the reflected bit buffer.
CppRuntimeException | When the reflected object is not a bit buffer (i.e. extern type). |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::BitBufferReflectable< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets bool value of the bool reflectable.
CppRuntimeException | When the reflected object is not a bool type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::BoolReflectable< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets byte value of the bytes reflectable.
CppRuntimeException | When the reflected object is not a bytes type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::BytesReflectable< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets name of the field which is active in the reflected choice type.
CppRuntimeException | When the reflected object is not a choice type (or union). |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets double value of the double reflectable.
CppRuntimeException | When the reflected object is not a double type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::Float64Reflectable< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reflectable view to the field (i.e. member) with the given schema name.
name | Field schema name. |
CppRuntimeException | When the reflected object is not a compound type or when the field with the given name doesn't exist or when the field getter itself throws. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reflectable view to the field (i.e. member) with the given schema name.
name | Field schema name. |
CppRuntimeException | When the reflected object is not a compound type or when the field with the given name doesn't exist or when the field getter itself throws. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::ReflectableConstAllocatorHolderBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets float value of the float reflectable.
CppRuntimeException | When the reflected object is not a float type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::Float32Reflectable< ALLOC >, zserio::Float16Reflectable< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets 16-bit signed integral value of the int16_t reflectable.
CppRuntimeException | When the reflected object is not a int16_t type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::Int16ReflectableBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets 32-bit signed integral value of the int32_t reflectable.
CppRuntimeException | When the reflected object is not a int32_t type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::Int32ReflectableBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets 64-bit signed integral value of the int64_t reflectable.
CppRuntimeException | When the reflected object is not a int64_t type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::Int64ReflectableBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets 8-bit signed integral value of the int8_t reflectable.
CppRuntimeException | When the reflected object is not a int8_t type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::Int8ReflectableBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reflectable view to the parameter (i.e. member) with the given schema name.
name | Parameter schema name. |
CppRuntimeException | When the reflected object is not a compound type or when the parameter with the given name doesn't exist or when the parameter getter itself throws. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reflectable view to the parameter (i.e. member) with the given schema name.
name | Parameter schema name. |
CppRuntimeException | When the reflected object is not a compound type or when the parameter with the given name doesn't exist or when the parameter getter itself throws. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::ReflectableConstAllocatorHolderBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reference to the string value of the string reflectable.
CppRuntimeException | When the reflected object is not a string type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::StringReflectable< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets type info for the current zserio object.
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets 16-bit unsigned integral value of the uint16_t reflectable.
CppRuntimeException | When the reflected object is not a uint16_t type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::UInt16ReflectableBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets 32-bit unsigned integral value of the uint32_t reflectable.
CppRuntimeException | When the reflected object is not a uint32_t type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::UInt32ReflectableBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets 64-bit unsigned integral value of the uint64_t reflectable.
CppRuntimeException | When the reflected object is not a uint64_t type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::UInt64ReflectableBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets 8-bit unsigned integral value of the uint8_t reflectable.
CppRuntimeException | When the reflected object is not a uint8_t type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::UInt8ReflectableBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Initializes the reflected parameterized compound object. Calls initialize method on the generated C++ object. Note that the arguments must exactly match. In case that the argument is a compound type, which is normally passed as a reference, it must be wrapped in a reference wrapper.
CppRuntimeException | When the reflected object is not parameterized or when the arguments do not match. |
Implemented in zserio::ReflectableArrayBase< ALLOC >, zserio::ReflectableConstAllocatorHolderBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Initializes children of the reflected compound. Calls initializeChildren method on the generated C++ object, which recursively initializes the whole object tree. When nothing within the object tree is parameterized, does nothing.
CppRuntimeException | When the reflected object is not a compound type. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::ReflectableConstAllocatorHolderBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Initializes indexed offsets of the reflected compound object.
The bit stream position to be used for calculation is defaulted to zero.
CppRuntimeException | When the reflected object is not a compound. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Initializes indexed offsets of the reflected compound object.
bitPosition | The bit stream position to be used for calculation. |
CppRuntimeException | When the reflected object is not a compound. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::ReflectableConstAllocatorHolderBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets whether the reflected object is an array.
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reflectable view to an array element.
CppRuntimeException | When the reflected object is not an array or when the given index is out of bounds of the underlying array. |
Overloaded method provided for convenience.
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets reflectable view to an array element.
CppRuntimeException | When the reflected object is not an array or when the given index is out of bounds of the underlying array. |
Overloaded method provided for convenience.
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableConstArrayBase< ALLOC >, zserio::ReflectableArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Universal accessor to zserio entities within the zserio sub-tree represented by the reflected object.
Supports dot notation corresponding to the tree defined in zserio language. Can access fields or parameters or call functions within the zserio sub-tree.
Examples:
path | Dot notation corresponding to the zserio tree. |
Overloaded method provided for convenience.
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Universal accessor to zserio entities within the zserio sub-tree represented by the reflected object.
Supports dot notation corresponding to the tree defined in zserio language. Can access fields or parameters or call functions within the zserio sub-tree.
Examples:
path | Dot notation corresponding to the zserio tree. |
Overloaded method provided for convenience.
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Returns the parsing information after reading of the reflectable object.
This feature is experimental and can be removed without any warning!
-withParsingInfo
option.CppRuntimeException | If the object was compiled without the parsing info feature enabled. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Resizes the reflected array.
size | New array size. |
CppRuntimeException | When the reflected object is not an array. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::EnumReflectableArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableArray< ALLOC, RAW_ARRAY >, zserio::DynamicBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::ReflectableBase< ALLOC >, and zserio::ReflectableConstArrayBase< ALLOC >.
|
pure virtual |
Sets an element value at the given index within the reflected array.
value | Value to set. |
index | Index of the element to set. |
CppRuntimeException | When the reflected object is not an array. |
Implemented in zserio::EnumReflectableArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableArray< ALLOC, RAW_ARRAY >, zserio::DynamicBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::ReflectableConstArrayBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Sets the field (i.e. member) with the given schema name.
name | Field schema name. |
value | Value to set. The type must exactly match the type of the zserio field mapped to C++! |
CppRuntimeException | When the reflected object is not a compound type or when the field with the given name doesn't exist or when the provided value is of a wrong type or when the field setter itself throws. |
Implemented in zserio::ReflectableArrayBase< ALLOC >, zserio::ReflectableConstAllocatorHolderBase< ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Gets size of the reflected array.
CppRuntimeException | When the reflected object is not an array. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::EnumReflectableArray< ALLOC, RAW_ARRAY >, zserio::EnumReflectableConstArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableArray< ALLOC, RAW_ARRAY >, zserio::BitmaskReflectableConstArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableArray< ALLOC, RAW_ARRAY >, zserio::CompoundReflectableConstArray< ALLOC, RAW_ARRAY >, zserio::DynamicBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::DynamicBitFieldReflectableConstArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::FixedBitFieldReflectableConstArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, zserio::BuiltinReflectableConstArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Converts any numeric value to double.
Works also for bitmask and enum types.
CppRuntimeException | When the reflected object cannot be converted to double. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::FloatingPointReflectableBase< ALLOC, T >, zserio::FloatingPointReflectableBase< ALLOC, float >, zserio::FloatingPointReflectableBase< ALLOC, double >, zserio::IntegralReflectableBase< ALLOC, T >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Converts any signed integral value to 64-bit signed integer.
Works also for enum types defined with signed underlying type.
CppRuntimeException | When the reflected object cannot be converted to a signed integral value. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::SignedReflectableBase< ALLOC, T >, zserio::SignedReflectableBase< ALLOC, int8_t >, zserio::SignedReflectableBase< ALLOC, int32_t >, zserio::SignedReflectableBase< ALLOC, int64_t >, zserio::SignedReflectableBase< ALLOC, int16_t >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Converts an reflected object to string.
Works for all integral types including bool, bitmask and enum types and for string types.
allocator | Allocator to use for the string allocation. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Converts an reflected object to string.
Works for all integral types including bool, bitmask and enum types and for string types.
allocator | Allocator to use for the string allocation. |
Implemented in zserio::ReflectableArrayBase< ALLOC >, zserio::StringReflectable< ALLOC >, zserio::IntegralReflectableBase< ALLOC, T >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Converts any unsigned integral value to 64-bit unsigned integer.
Works also for bitmask and enum typed defined with unsigned underlying type.
CppRuntimeException | When the reflected object cannot be converted to an unsigned integral value. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::UnsignedReflectableBase< ALLOC, T >, zserio::UnsignedReflectableBase< ALLOC, bool >, zserio::UnsignedReflectableBase< ALLOC, uint64_t >, zserio::UnsignedReflectableBase< ALLOC, uint8_t >, zserio::UnsignedReflectableBase< ALLOC, uint32_t >, zserio::UnsignedReflectableBase< ALLOC, uint16_t >, and zserio::ReflectableBase< ALLOC >.
|
pure virtual |
Writes the reflected object to a bit stream using the given bit stream writer.
writer | Bit stream writer to use. |
CppRuntimeException | When the reflected object is an array. |
Implemented in zserio::ReflectableOwner< T, ALLOC >, zserio::ReflectableArrayBase< ALLOC >, zserio::BitBufferReflectable< ALLOC >, zserio::StringReflectable< ALLOC >, zserio::BytesReflectable< ALLOC >, zserio::Float64Reflectable< ALLOC >, zserio::Float32Reflectable< ALLOC >, zserio::Float16Reflectable< ALLOC >, zserio::VarSizeReflectable< ALLOC >, zserio::VarUIntReflectable< ALLOC >, zserio::VarUInt64Reflectable< ALLOC >, zserio::VarUInt32Reflectable< ALLOC >, zserio::VarUInt16Reflectable< ALLOC >, zserio::VarIntReflectable< ALLOC >, zserio::VarInt64Reflectable< ALLOC >, zserio::VarInt32Reflectable< ALLOC >, zserio::VarInt16Reflectable< ALLOC >, zserio::DynamicUnsignedBitFieldReflectable< ALLOC, uint64_t >, zserio::DynamicUnsignedBitFieldReflectable< ALLOC, uint32_t >, zserio::DynamicUnsignedBitFieldReflectable< ALLOC, uint16_t >, zserio::DynamicUnsignedBitFieldReflectable< ALLOC, uint8_t >, zserio::DynamicSignedBitFieldReflectable< ALLOC, int64_t >, zserio::DynamicSignedBitFieldReflectable< ALLOC, int32_t >, zserio::DynamicSignedBitFieldReflectable< ALLOC, int16_t >, zserio::DynamicSignedBitFieldReflectable< ALLOC, int8_t >, zserio::FixedUnsignedBitFieldReflectable< ALLOC, uint64_t >, zserio::FixedUnsignedBitFieldReflectable< ALLOC, uint32_t >, zserio::FixedUnsignedBitFieldReflectable< ALLOC, uint16_t >, zserio::FixedUnsignedBitFieldReflectable< ALLOC, uint8_t >, zserio::FixedSignedBitFieldReflectable< ALLOC, int64_t >, zserio::FixedSignedBitFieldReflectable< ALLOC, int32_t >, zserio::FixedSignedBitFieldReflectable< ALLOC, int16_t >, zserio::FixedSignedBitFieldReflectable< ALLOC, int8_t >, zserio::UInt64Reflectable< ALLOC >, zserio::UInt32Reflectable< ALLOC >, zserio::UInt16Reflectable< ALLOC >, zserio::UInt8Reflectable< ALLOC >, zserio::Int64Reflectable< ALLOC >, zserio::Int32Reflectable< ALLOC >, zserio::Int16Reflectable< ALLOC >, zserio::Int8Reflectable< ALLOC >, zserio::BoolReflectable< ALLOC >, and zserio::ReflectableBase< ALLOC >.