Zserio C++ runtime library  1.2.0
Built for Zserio 2.16.0
zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE > Class Template Reference

#include <Reflectable.h>

Inheritance diagram for zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >:
Collaboration diagram for zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >:

Public Member Functions

 FixedBitFieldReflectableArray (const ALLOC &allocator, RAW_ARRAY &rawArray, uint8_t bitSize)
 
size_t size () const override
 
void resize (size_t size) override
 
IBasicReflectableConstPtr< ALLOC > at (size_t index) const override
 
IBasicReflectablePtr< ALLOC > at (size_t index) override
 
void setAt (const AnyHolder< ALLOC > &value, size_t index) override
 
void append (const AnyHolder< ALLOC > &value) override
 
AnyHolder< ALLOC > getAnyValue (const ALLOC &allocator) const override
 
AnyHolder< ALLOC > getAnyValue (const ALLOC &allocator) override
 
- Public Member Functions inherited from zserio::ReflectableArrayBase< ALLOC >
bool isArray () const override
 
void initializeChildren () override
 
void initialize (const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments) override
 
size_t initializeOffsets (size_t bitPosition) override
 
size_t bitSizeOf (size_t bitPosition) const override
 
void write (BitStreamWriter &writer) const override
 
IBasicReflectableConstPtr< ALLOC > getField (StringView name) const override
 
IBasicReflectablePtr< ALLOC > getField (StringView name) override
 
IBasicReflectablePtr< ALLOC > createField (StringView name) override
 
void setField (StringView name, const AnyHolder< ALLOC > &value) override
 
IBasicReflectableConstPtr< ALLOC > getParameter (StringView name) const override
 
IBasicReflectablePtr< ALLOC > getParameter (StringView name) override
 
IBasicReflectableConstPtr< ALLOC > callFunction (StringView name) const override
 
IBasicReflectablePtr< ALLOC > callFunction (StringView name) override
 
StringView getChoice () const override
 
IBasicReflectableConstPtr< ALLOC > operator[] (size_t index) const override
 
IBasicReflectablePtr< ALLOC > operator[] (size_t index) override
 
bool getBool () const override
 
int8_t getInt8 () const override
 
int16_t getInt16 () const override
 
int32_t getInt32 () const override
 
int64_t getInt64 () const override
 
uint8_t getUInt8 () const override
 
uint16_t getUInt16 () const override
 
uint32_t getUInt32 () const override
 
uint64_t getUInt64 () const override
 
float getFloat () const override
 
double getDouble () const override
 
Span< const uint8_t > getBytes () const override
 
StringView getStringView () const override
 
const BasicBitBuffer< ALLOC > & getBitBuffer () const override
 
int64_t toInt () const override
 
uint64_t toUInt () const override
 
double toDouble () const override
 
string< ALLOC > toString (const ALLOC &allocator) const override
 
- Public Member Functions inherited from zserio::ReflectableAllocatorHolderBase< ALLOC >
 ReflectableAllocatorHolderBase (const IBasicTypeInfo< ALLOC > &typeInfo, const ALLOC &allocator)
 
- Public Member Functions inherited from zserio::ReflectableBase< ALLOC >
 ReflectableBase (const IBasicTypeInfo< ALLOC > &typeInfo)
 
 ~ReflectableBase () override=0
 
const IBasicTypeInfo< ALLOC > & getTypeInfo () const override
 
size_t initializeOffsets () override
 
size_t bitSizeOf () const override
 
IBasicReflectableConstPtr< ALLOC > find (StringView path) const override
 
IBasicReflectablePtr< ALLOC > find (StringView path) override
 
IBasicReflectableConstPtr< ALLOC > operator[] (StringView path) const override
 
IBasicReflectablePtr< ALLOC > operator[] (StringView path) override
 
AnyHolder< ALLOC > getAnyValue () const override
 
AnyHolder< ALLOC > getAnyValue () override
 
string< ALLOC > toString () const override
 
const ParsingInfoparsingInfo () const override
 
 ReflectableBase (const ReflectableBase &)=delete
 
ReflectableBaseoperator= (const ReflectableBase &)=delete
 
 ReflectableBase (const ReflectableBase &&)=delete
 
ReflectableBaseoperator= (const ReflectableBase &&)=delete
 
- Public Member Functions inherited from zserio::IBasicReflectable< ALLOC >
virtual ~IBasicReflectable ()=default
 
- Public Member Functions inherited from zserio::AllocatorHolder< ALLOC >
 AllocatorHolder ()
 
 AllocatorHolder (const allocator_type &allocator)
 
 AllocatorHolder (allocator_type &&allocator)
 
allocator_type get_allocator () const
 
 ~AllocatorHolder ()=default
 
 AllocatorHolder (const AllocatorHolder &other)=default
 
AllocatorHolderoperator= (const AllocatorHolder &other)=default
 
 AllocatorHolder (AllocatorHolder &&other)=default
 
AllocatorHolderoperator= (AllocatorHolder &&other)=default
 

Additional Inherited Members

- Public Types inherited from zserio::IBasicReflectable< ALLOC >
using Ptr = std::shared_ptr< IBasicReflectable >
 
using ConstPtr = std::shared_ptr< const IBasicReflectable >
 
- Public Types inherited from zserio::AllocatorHolder< ALLOC >
using allocator_type = ALLOC
 
- Protected Member Functions inherited from zserio::AllocatorHolder< ALLOC >
void set_allocator (const allocator_type &allocator)
 
void set_allocator (allocator_type &&allocator)
 
allocator_typeget_allocator_ref ()
 
const allocator_typeget_allocator_ref () const
 

Detailed Description

template<typename ALLOC, typename RAW_ARRAY, typename ELEMENT_REFLECTABLE>
class zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >

Definition at line 2328 of file Reflectable.h.

Constructor & Destructor Documentation

◆ FixedBitFieldReflectableArray()

template<typename ALLOC , typename RAW_ARRAY , typename ELEMENT_REFLECTABLE >
zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >::FixedBitFieldReflectableArray ( const ALLOC &  allocator,
RAW_ARRAY &  rawArray,
uint8_t  bitSize 
)
inline

Definition at line 2338 of file Reflectable.h.

Member Function Documentation

◆ append()

template<typename ALLOC , typename RAW_ARRAY , typename ELEMENT_REFLECTABLE >
void zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >::append ( const AnyHolder< ALLOC > &  value)
inlineoverridevirtual

Appends an element at the given index within the reflected array.

Parameters
valueValue to append.
Exceptions
CppRuntimeExceptionWhen the reflected object is not an array.

Reimplemented from zserio::ReflectableBase< ALLOC >.

Definition at line 2391 of file Reflectable.h.

◆ at() [1/2]

template<typename ALLOC , typename RAW_ARRAY , typename ELEMENT_REFLECTABLE >
IBasicReflectableConstPtr<ALLOC> zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >::at ( size_t  index) const
inlineoverridevirtual

Gets reflectable view to an array element.

Note
Can be called only when the reflected object is an array.
Returns
Reflectable view to an array element on the given index.
Exceptions
CppRuntimeExceptionWhen the reflected object is not an array or when the given index is out of bounds of the underlying array.

Reimplemented from zserio::ReflectableBase< ALLOC >.

Definition at line 2353 of file Reflectable.h.

◆ at() [2/2]

template<typename ALLOC , typename RAW_ARRAY , typename ELEMENT_REFLECTABLE >
IBasicReflectablePtr<ALLOC> zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >::at ( size_t  index)
inlineoverridevirtual

Gets reflectable view to an array element.

Note
Can be called only when the reflected object is an array.
Returns
Reflectable view to an array element on the given index.
Exceptions
CppRuntimeExceptionWhen the reflected object is not an array or when the given index is out of bounds of the underlying array.

Reimplemented from zserio::ReflectableBase< ALLOC >.

Definition at line 2366 of file Reflectable.h.

◆ getAnyValue() [1/2]

template<typename ALLOC , typename RAW_ARRAY , typename ELEMENT_REFLECTABLE >
AnyHolder<ALLOC> zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >::getAnyValue ( const ALLOC &  allocator) const
inlineoverridevirtual

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.

Note
For bit buffers only const reference is available.
Overloads without parameter use default constructed allocator.
Parameters
allocatorAllocator to use for the value allocation.
Returns
Any value.

Reimplemented from zserio::ReflectableBase< ALLOC >.

Definition at line 2396 of file Reflectable.h.

◆ getAnyValue() [2/2]

template<typename ALLOC , typename RAW_ARRAY , typename ELEMENT_REFLECTABLE >
AnyHolder<ALLOC> zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >::getAnyValue ( const ALLOC &  allocator)
inlineoverridevirtual

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.

Note
For bit buffers only const reference is available.
Overloads without parameter use default constructed allocator.
Parameters
allocatorAllocator to use for the value allocation.
Returns
Any value.

Reimplemented from zserio::ReflectableBase< ALLOC >.

Definition at line 2401 of file Reflectable.h.

◆ resize()

template<typename ALLOC , typename RAW_ARRAY , typename ELEMENT_REFLECTABLE >
void zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >::resize ( size_t  size)
inlineoverridevirtual

Resizes the reflected array.

Note
Can be called only when the reflected object is an array.
Parameters
sizeNew array size.
Exceptions
CppRuntimeExceptionWhen the reflected object is not an array.

Reimplemented from zserio::ReflectableBase< ALLOC >.

Definition at line 2348 of file Reflectable.h.

◆ setAt()

template<typename ALLOC , typename RAW_ARRAY , typename ELEMENT_REFLECTABLE >
void zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >::setAt ( const AnyHolder< ALLOC > &  value,
size_t  index 
)
inlineoverridevirtual

Sets an element value at the given index within the reflected array.

Parameters
valueValue to set.
indexIndex of the element to set.
Exceptions
CppRuntimeExceptionWhen the reflected object is not an array.

Reimplemented from zserio::ReflectableBase< ALLOC >.

Definition at line 2379 of file Reflectable.h.

◆ size()

template<typename ALLOC , typename RAW_ARRAY , typename ELEMENT_REFLECTABLE >
size_t zserio::FixedBitFieldReflectableArray< ALLOC, RAW_ARRAY, ELEMENT_REFLECTABLE >::size ( ) const
inlineoverridevirtual

Gets size of the reflected array.

Note
Can be called only when the reflected object is an array.
Returns
Size of the reflected array.
Exceptions
CppRuntimeExceptionWhen the reflected object is not an array.

Reimplemented from zserio::ReflectableBase< ALLOC >.

Definition at line 2343 of file Reflectable.h.


The documentation for this class was generated from the following file: