Zserio C++ runtime library  1.0.0
Built for Zserio 2.13.0
zserio::BasicRegexWalkFilter< ALLOC > Class Template Reference

#include <Walker.h>

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

Public Member Functions

 BasicRegexWalkFilter (const char *pathRegex, const ALLOC &allocator=ALLOC())
 
 ~BasicRegexWalkFilter () override=default
 
bool beforeArray (const IBasicReflectableConstPtr< ALLOC > &array, const BasicFieldInfo< ALLOC > &fieldInfo) override
 
bool afterArray (const IBasicReflectableConstPtr< ALLOC > &array, const BasicFieldInfo< ALLOC > &fieldInfo) override
 
bool beforeCompound (const IBasicReflectableConstPtr< ALLOC > &compound, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex) override
 
bool afterCompound (const IBasicReflectableConstPtr< ALLOC > &compound, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex) override
 
bool beforeValue (const IBasicReflectableConstPtr< ALLOC > &value, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex) override
 
bool afterValue (const IBasicReflectableConstPtr< ALLOC > &value, const BasicFieldInfo< ALLOC > &fieldInfo, size_t elementIndex) override
 
 BasicRegexWalkFilter (const BasicRegexWalkFilter &other)=delete
 
BasicRegexWalkFilteroperator= (const BasicRegexWalkFilter &other)=delete
 
 BasicRegexWalkFilter (BasicRegexWalkFilter &&other)=delete
 
BasicRegexWalkFilteroperator= (BasicRegexWalkFilter &&other)=delete
 
- Public Member Functions inherited from zserio::IBasicWalkFilter< ALLOC >
virtual ~IBasicWalkFilter ()=default
 

Detailed Description

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

Walk filter which allows to walk only paths matching the given regex.

The path is constructed from field names within the root object, thus the root object itself is not part of the path.

Array elements have the index appended to the path so that e.g. "compound.arrayField[0]" will match only the first element in the array "arrayField".

Definition at line 260 of file Walker.h.

Constructor & Destructor Documentation

template<typename ALLOC >
zserio::BasicRegexWalkFilter< ALLOC >::BasicRegexWalkFilter ( const char *  pathRegex,
const ALLOC &  allocator = ALLOC() 
)
explicit

Constructor.

Parameters
pathRegexPath regex to use for filtering.

Definition at line 744 of file Walker.h.

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

Method generated by default.

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

Copying is disallowed!

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

Copying is disallowed!

Member Function Documentation

template<typename ALLOC >
bool zserio::BasicRegexWalkFilter< ALLOC >::afterArray ( const IBasicReflectableConstPtr< 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 772 of file Walker.h.

template<typename ALLOC >
bool zserio::BasicRegexWalkFilter< ALLOC >::afterCompound ( const IBasicReflectableConstPtr< 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 791 of file Walker.h.

template<typename ALLOC >
bool zserio::BasicRegexWalkFilter< ALLOC >::afterValue ( const IBasicReflectableConstPtr< 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 807 of file Walker.h.

template<typename ALLOC >
bool zserio::BasicRegexWalkFilter< ALLOC >::beforeArray ( const IBasicReflectableConstPtr< 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 749 of file Walker.h.

template<typename ALLOC >
bool zserio::BasicRegexWalkFilter< ALLOC >::beforeCompound ( const IBasicReflectableConstPtr< 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 780 of file Walker.h.

template<typename ALLOC >
bool zserio::BasicRegexWalkFilter< ALLOC >::beforeValue ( const IBasicReflectableConstPtr< 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 799 of file Walker.h.

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

Copying is disallowed!

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

Copying is disallowed!


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