JSON Voorhees
Killer JSON for C++
Loading...
Searching...
No Matches
jsonv::dynamic_merge_rules Class Reference

An implementation of merge_rules that allows you to bind whatever functions you want to resolve conflicts. More...

#include <jsonv/algorithm.hpp>

+ Inheritance diagram for jsonv::dynamic_merge_rules:
+ Collaboration diagram for jsonv::dynamic_merge_rules:

Public Types

using same_key_function = std::function< value(path &&, value &&, value &&)>
 
using type_conflict_function = std::function< value(path &&, value &&, value &&)>
 

Public Member Functions

 dynamic_merge_rules (same_key_function same_key, type_conflict_function type_conflict)
 
virtual value resolve_same_key (path &&current_path, value &&a, value &&b) const override
 
virtual value resolve_type_conflict (path &&current_path, value &&a, value &&b) const override
 

Public Attributes

same_key_function same_key
 
type_conflict_function type_conflict
 

Detailed Description

An implementation of merge_rules that allows you to bind whatever functions you want to resolve conflicts.

Definition at line 300 of file algorithm.hpp.

Member Typedef Documentation

◆ same_key_function

using jsonv::dynamic_merge_rules::same_key_function = std::function<value (path&&, value&&, value&&)>

Definition at line 304 of file algorithm.hpp.

◆ type_conflict_function

using jsonv::dynamic_merge_rules::type_conflict_function = std::function<value (path&&, value&&, value&&)>

Definition at line 306 of file algorithm.hpp.

Member Function Documentation

◆ resolve_same_key()

virtual value jsonv::dynamic_merge_rules::resolve_same_key ( path &&  current_path,
value &&  a,
value &&  b 
) const
overridevirtual

◆ resolve_type_conflict()

virtual value jsonv::dynamic_merge_rules::resolve_type_conflict ( path &&  current_path,
value &&  a,
value &&  b 
) const
overridevirtual

Member Data Documentation

◆ same_key

same_key_function jsonv::dynamic_merge_rules::same_key

Definition at line 315 of file algorithm.hpp.

◆ type_conflict

type_conflict_function jsonv::dynamic_merge_rules::type_conflict

Definition at line 317 of file algorithm.hpp.


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