Zserio C++17 runtime library 1.3.0
Built for Zserio 2.20.0
Loading...
Searching...
No Matches
zserio::BasicAndWalkFilter< ALLOC > Class Template Reference

#include <Walker.h>

Inheritance diagram for zserio::BasicAndWalkFilter< ALLOC >:
Collaboration diagram for zserio::BasicAndWalkFilter< ALLOC >:

Public Types

using WalkFilterRef = std::reference_wrapper< IBasicWalkFilter< ALLOC > >
 
using WalkFilters = Vector< WalkFilterRef, RebindAlloc< ALLOC, WalkFilterRef > >
 
- Public Types inherited from zserio::IBasicWalkFilter< ALLOC >
using Path = Vector< BasicString< RebindAlloc< ALLOC, char > >, RebindAlloc< ALLOC, BasicString< RebindAlloc< ALLOC, char > > > >
 

Public Member Functions

 BasicAndWalkFilter (const WalkFilters &walkFilters)
 
 ~BasicAndWalkFilter () override=default
 
bool beforeArray (const IBasicReflectableDataConstPtr< ALLOC > &array, const BasicFieldInfo< ALLOC > &fieldInfo) override
 
bool afterArray (const IBasicReflectableDataConstPtr< ALLOC > &array, const BasicFieldInfo< ALLOC > &fieldInfo) override
 
bool beforeCompound (const IBasicReflectableDataConstPtr< ALLOC > &compound, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex) override
 
bool afterCompound (const IBasicReflectableDataConstPtr< ALLOC > &compound, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex) override
 
bool beforeValue (const IBasicReflectableDataConstPtr< ALLOC > &value, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex) override
 
bool afterValue (const IBasicReflectableDataConstPtr< ALLOC > &value, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex) override
 
 BasicAndWalkFilter (const BasicAndWalkFilter &other)=delete
 
BasicAndWalkFilter & operator= (const BasicAndWalkFilter &other)=delete
 
 BasicAndWalkFilter (BasicAndWalkFilter &&other)=delete
 
BasicAndWalkFilter & operator= (BasicAndWalkFilter &&other)=delete
 
- Public Member Functions inherited from zserio::IBasicWalkFilter< ALLOC >
virtual ~IBasicWalkFilter ()=default
 

Detailed Description

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

Walk filter which implements composition of particular filters.

The filters are called sequentially and logical and is applied on theirs results. Note that all filters are always called.

Definition at line 380 of file Walker.h.

Member Typedef Documentation

◆ WalkFilterRef

template<typename ALLOC = std::allocator<uint8_t>>
using zserio::BasicAndWalkFilter< ALLOC >::WalkFilterRef = std::reference_wrapper<IBasicWalkFilter<ALLOC> >

Definition at line 383 of file Walker.h.

◆ WalkFilters

template<typename ALLOC = std::allocator<uint8_t>>
using zserio::BasicAndWalkFilter< ALLOC >::WalkFilters = Vector<WalkFilterRef, RebindAlloc<ALLOC, WalkFilterRef> >

Definition at line 384 of file Walker.h.

Constructor & Destructor Documentation

◆ BasicAndWalkFilter() [1/3]

template<typename ALLOC >
zserio::BasicAndWalkFilter< ALLOC >::BasicAndWalkFilter ( const WalkFilters &  walkFilters)
explicit

Constructor.

Parameters
walkFiltersList of filters to use in composition.

Definition at line 937 of file Walker.h.

◆ ~BasicAndWalkFilter()

template<typename ALLOC = std::allocator<uint8_t>>
zserio::BasicAndWalkFilter< ALLOC >::~BasicAndWalkFilter ( )
overridedefault

Method generated by default.

◆ BasicAndWalkFilter() [2/3]

template<typename ALLOC = std::allocator<uint8_t>>
zserio::BasicAndWalkFilter< ALLOC >::BasicAndWalkFilter ( const BasicAndWalkFilter< ALLOC > &  other)
delete

Copying and moving is disallowed!

◆ BasicAndWalkFilter() [3/3]

template<typename ALLOC = std::allocator<uint8_t>>
zserio::BasicAndWalkFilter< ALLOC >::BasicAndWalkFilter ( BasicAndWalkFilter< ALLOC > &&  other)
delete

Copying and moving is disallowed!

Member Function Documentation

◆ afterArray()

template<typename ALLOC >
bool zserio::BasicAndWalkFilter< ALLOC >::afterArray ( const IBasicReflectableDataConstPtr< ALLOC > &  array,
const BasicFieldInfo< ALLOC > &  fieldInfo 
)
overridevirtual

Called after an array.

Parameters
arrayReflectable zserio array.
fieldInfoArray field info.
Returns
True when the walking should continue to a next sibling, false to return to the parent.

Implements zserio::IBasicWalkFilter< ALLOC >.

Definition at line 949 of file Walker.h.

◆ afterCompound()

template<typename ALLOC >
bool zserio::BasicAndWalkFilter< ALLOC >::afterCompound ( const IBasicReflectableDataConstPtr< ALLOC > &  compound,
const BasicFieldInfo< ALLOC > &  fieldInfo,
size_t  elementIndex 
)
overridevirtual

Called after a 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.
Returns
True when the walking should continue to a next sibling, false to return to the parent.

Implements zserio::IBasicWalkFilter< ALLOC >.

Definition at line 963 of file Walker.h.

◆ afterValue()

template<typename ALLOC >
bool zserio::BasicAndWalkFilter< ALLOC >::afterValue ( const IBasicReflectableDataConstPtr< ALLOC > &  value,
const BasicFieldInfo< ALLOC > &  fieldInfo,
size_t  elementIndex 
)
overridevirtual

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

Parameters
valueReflectable simple value.
fieldInfoField info.
elementIndexElement index in array or None if the value is not in array.
Returns
True when the walking should continue to a next sibling, false to return to the parent.

Implements zserio::IBasicWalkFilter< ALLOC >.

Definition at line 977 of file Walker.h.

◆ beforeArray()

template<typename ALLOC >
bool zserio::BasicAndWalkFilter< ALLOC >::beforeArray ( const IBasicReflectableDataConstPtr< ALLOC > &  array,
const BasicFieldInfo< ALLOC > &  fieldInfo 
)
overridevirtual

Called before an array.

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

Parameters
arrayReflectable zserio array.
fieldInfoArray field info.
Returns
True when the walking should continue to the array.

Implements zserio::IBasicWalkFilter< ALLOC >.

Definition at line 942 of file Walker.h.

◆ beforeCompound()

template<typename ALLOC >
bool zserio::BasicAndWalkFilter< ALLOC >::beforeCompound ( const IBasicReflectableDataConstPtr< ALLOC > &  compound,
const BasicFieldInfo< ALLOC > &  fieldInfo,
size_t  elementIndex 
)
overridevirtual

Called before a compound object.

Note that for unset compounds (i.e. non-present optionals) the beforeValue 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.
Returns
True when the walking should continue into the compound object, false otherwise.

Implements zserio::IBasicWalkFilter< ALLOC >.

Definition at line 956 of file Walker.h.

◆ beforeValue()

template<typename ALLOC >
bool zserio::BasicAndWalkFilter< ALLOC >::beforeValue ( const IBasicReflectableDataConstPtr< ALLOC > &  value,
const BasicFieldInfo< ALLOC > &  fieldInfo,
size_t  elementIndex 
)
overridevirtual

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

Parameters
valueReflectable simple value.
fieldInfoField info.
elementIndexElement index in array or WALKER_NOT_ELEMENT if the value is not in array.
Returns
True when the walking should continue to the simple value, false otherwise.

Implements zserio::IBasicWalkFilter< ALLOC >.

Definition at line 970 of file Walker.h.

◆ operator=() [1/2]

template<typename ALLOC = std::allocator<uint8_t>>
BasicAndWalkFilter & zserio::BasicAndWalkFilter< ALLOC >::operator= ( BasicAndWalkFilter< ALLOC > &&  other)
delete

Copying and moving is disallowed!

◆ operator=() [2/2]

template<typename ALLOC = std::allocator<uint8_t>>
BasicAndWalkFilter & zserio::BasicAndWalkFilter< ALLOC >::operator= ( const BasicAndWalkFilter< ALLOC > &  other)
delete

Copying and moving is disallowed!


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