Dev Essential
Loading...
Searching...
No Matches
dd_struct_access.h File Reference
#include <ddl/dd/datamodel/datamodel_datadefinition.h>
#include <cstddef>
#include <functional>
#include <string>
Include dependency graph for dd_struct_access.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ddl::dd::StructElementAccess
 Class to access and obtain the byte position and other information of a instance of this element within a struct (see StructTypeAccess). More...
 
class  ddl::dd::StructArrayElementAccessIterator
 
class  ddl::dd::StructElementAccessIterator
 Iterator to iterate thru the StructTypeAccess. More...
 
class  ddl::dd::StructTypeAccess
 Accessing class for a instance of a struct. This will calculate the byte positions can be used for serialialization and deserialization. More...
 

Namespaces

namespace  ddl
 definition of the ddl namespace
 
namespace  ddl::dd
 definition of the dd namespace
 

Typedefs

using ddl::dd::CallbackStructElementAccess
 Callback function type definitions for struct element access traversal.
 
using ddl::dd::CallbackStructElementAccessControl
 Callback function type definitions for struct element access traversal. The return value indicates if the traversal should continue into the child or further array elements.
 

Functions

std::pair< std::string_view, std::string_view > ddl::dd::findFirstNameInPath (std::string_view name_path)
 Extract first naming component from a path.
 
std::pair< std::string_view, OptionalSize > ddl::dd::findArrayPos (std::string_view name)
 Determine the position of the named element within an array.
 
template<typename ACCESS_LEAF_CALLBACK, typename ENTER_ELEMENT_MEMBER_CALLBACK, typename LEAVE_ELEMENT_MEMBER_CALLBACK, typename ENTER_ARRAY_ELEMENT_MEMBER_CALLBACK, typename LEAVE_ARRAY_ELEMENT_MEMBER_CALLBACK>
void ddl::dd::forEachElementInfix (const StructTypeAccess &parent, ACCESS_LEAF_CALLBACK &&access_leaf_callback, ENTER_ELEMENT_MEMBER_CALLBACK &&enter_element_member_callback, LEAVE_ELEMENT_MEMBER_CALLBACK &&leave_element_member_callback, ENTER_ARRAY_ELEMENT_MEMBER_CALLBACK &&enter_array_element_member_callback, LEAVE_ARRAY_ELEMENT_MEMBER_CALLBACK &&leave_array_element_member_callback, bool filter_padding_elements=true, bool continue_arrays_after_skip=true)
 Traverse all elements of a struct type access in infix order and calls the callbacks.
 
template<typename ACCESS_LEAF_CALLBACK, typename ENTER_ELEMENT_MEMBER_CALLBACK, typename LEAVE_ELEMENT_MEMBER_CALLBACK>
void ddl::dd::forEachElementInfix (const StructTypeAccess &parent, ACCESS_LEAF_CALLBACK &&access_leaf_callback, ENTER_ELEMENT_MEMBER_CALLBACK &&enter_element_member_callback, LEAVE_ELEMENT_MEMBER_CALLBACK &&leave_element_member_callback, bool filter_padding_elements=true)
 Traverse all elements of a struct type access in infix order and calls the callbacks.
 
template<typename ACCESS_LEAF_CALLBACK>
void ddl::dd::forEachElementInfix (const StructTypeAccess &parent, ACCESS_LEAF_CALLBACK &&access_leaf_callback, bool filter_padding_elements=true)
 Traverse all elements of a struct type access in infix order and calls the callbacks.
 
template<typename TARGET_ELEMENT_CALLBACK, typename ENTER_ELEMENT_MEMBER_CALLBACK, typename LEAVE_ELEMENT_MEMBER_CALLBACK, typename ENTER_ARRAY_ELEMENT_MEMBER_CALLBACK, typename LEAVE_ARRAY_ELEMENT_MEMBER_CALLBACK>
void ddl::dd::forEachElementInPathInfix (const StructTypeAccess &parent, std::string_view path, TARGET_ELEMENT_CALLBACK &&target_element_callback, ENTER_ELEMENT_MEMBER_CALLBACK &&enter_element_member_callback, LEAVE_ELEMENT_MEMBER_CALLBACK &&leave_element_member_callback, ENTER_ARRAY_ELEMENT_MEMBER_CALLBACK &&enter_array_element_member_callback, LEAVE_ARRAY_ELEMENT_MEMBER_CALLBACK &&leave_array_element_member_callback)
 Traverse all elements along a given path in struct type access in infix order and calls the callbacks.
 
template<typename TARGET_ELEMENT_CALLBACK, typename ENTER_ELEMENT_MEMBER_CALLBACK, typename LEAVE_ELEMENT_MEMBER_CALLBACK>
void ddl::dd::forEachElementInPathInfix (const StructTypeAccess &parent, std::string_view path, TARGET_ELEMENT_CALLBACK &&target_element_callback, ENTER_ELEMENT_MEMBER_CALLBACK &&enter_element_member_callback, LEAVE_ELEMENT_MEMBER_CALLBACK &&leave_element_member_callback)
 Traverse all elements along a given path in struct type access in infix order and calls the callbacks.
 

Variables

template<class RETURN_VALUE, class CALLBACK>
constexpr bool ddl::dd::is_for_each_element_callback_v
 

Detailed Description

OO DataDefinition Redesign