Zserio C++ runtime library  1.1.0
Built for Zserio 2.15.0
zserio::IBasicWalkObserver< ALLOC > Class Template Referenceabstract

#include <IWalkObserver.h>

Public Member Functions

virtual ~IBasicWalkObserver ()=default
 
virtual void beginRoot (const IBasicReflectableConstPtr< ALLOC > &compound)=0
 
virtual void endRoot (const IBasicReflectableConstPtr< ALLOC > &compound)=0
 
virtual void beginArray (const IBasicReflectableConstPtr< ALLOC > &array, const BasicFieldInfo< ALLOC > &fieldInfo)=0
 
virtual void endArray (const IBasicReflectableConstPtr< ALLOC > &array, const BasicFieldInfo< ALLOC > &fieldInfo)=0
 
virtual void beginCompound (const IBasicReflectableConstPtr< ALLOC > &compound, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex)=0
 
virtual void endCompound (const IBasicReflectableConstPtr< ALLOC > &compound, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex)=0
 
virtual void visitValue (const IBasicReflectableConstPtr< ALLOC > &value, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex)=0
 

Detailed Description

template<typename ALLOC = std::allocator<uint8_t>>
class zserio::IBasicWalkObserver< ALLOC >

Interface for observers which are called by the walker.

Definition at line 15 of file IWalkObserver.h.

Constructor & Destructor Documentation

◆ ~IBasicWalkObserver()

template<typename ALLOC = std::allocator<uint8_t>>
virtual zserio::IBasicWalkObserver< ALLOC >::~IBasicWalkObserver ( )
virtualdefault

Destructor.

Member Function Documentation

◆ beginArray()

template<typename ALLOC = std::allocator<uint8_t>>
virtual void zserio::IBasicWalkObserver< ALLOC >::beginArray ( const IBasicReflectableConstPtr< ALLOC > &  array,
const BasicFieldInfo< ALLOC > &  fieldInfo 
)
pure virtual

Called at the beginning of an array.

Note that for unset arrays (i.e. non-present optionals) the visitValue method with nullptr is called instead!

Parameters
arrayReflectable zserio array.
fieldInfoArray field info.

◆ beginCompound()

template<typename ALLOC = std::allocator<uint8_t>>
virtual void zserio::IBasicWalkObserver< ALLOC >::beginCompound ( const IBasicReflectableConstPtr< ALLOC > &  compound,
const BasicFieldInfo< ALLOC > &  fieldInfo,
size_t  elementIndex 
)
pure virtual

Called at the beginning of an compound field object.

Note that for unset compounds (i.e. non-present optionals) the visitValue method with nullptr is called instead!

Parameters
compoundReflectable compound zserio object.
fieldInfoCompound field info.
elementIndexElement index in array or WALKER_NOT_ELEMENT if the compound is not in array.

◆ beginRoot()

template<typename ALLOC = std::allocator<uint8_t>>
virtual void zserio::IBasicWalkObserver< ALLOC >::beginRoot ( const IBasicReflectableConstPtr< ALLOC > &  compound)
pure virtual

Called for the root compound zserio object which is to be walked-through.

Parameters
compoundReflectable root compound zserio object.

◆ endArray()

template<typename ALLOC = std::allocator<uint8_t>>
virtual void zserio::IBasicWalkObserver< ALLOC >::endArray ( const IBasicReflectableConstPtr< ALLOC > &  array,
const BasicFieldInfo< ALLOC > &  fieldInfo 
)
pure virtual

Called at the end of an array.

Parameters
arrayReflectable zserio array.
fieldInfoArray field info.

◆ endCompound()

template<typename ALLOC = std::allocator<uint8_t>>
virtual void zserio::IBasicWalkObserver< ALLOC >::endCompound ( const IBasicReflectableConstPtr< ALLOC > &  compound,
const BasicFieldInfo< ALLOC > &  fieldInfo,
size_t  elementIndex 
)
pure virtual

Called at the end of just walked compound object.

Parameters
compoundReflectable compound zserio object.
fieldInfoCompound field info.
elementIndexElement index in array or WALKER_NOT_ELEMENT if the compound is not in array.

◆ endRoot()

template<typename ALLOC = std::allocator<uint8_t>>
virtual void zserio::IBasicWalkObserver< ALLOC >::endRoot ( const IBasicReflectableConstPtr< ALLOC > &  compound)
pure virtual

Called at the end of just walked root compound zserio object.

Parameters
compoundReflectable root compound zserio object.

◆ visitValue()

template<typename ALLOC = std::allocator<uint8_t>>
virtual void zserio::IBasicWalkObserver< ALLOC >::visitValue ( const IBasicReflectableConstPtr< ALLOC > &  value,
const BasicFieldInfo< ALLOC > &  fieldInfo,
size_t  elementIndex 
)
pure virtual

Called when a simple (or an unset compound or array - i.e. nullptr) value is reached.

Parameters
valueReflectable simple value.
fieldInfoField info.
elementIndexElement index in array or WALKER_NOT_ELEMENT if the value is not in array.

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