Skip to content
Snippets Groups Projects
Commit c40b51da authored by Daniel Campora's avatar Daniel Campora
Browse files

Add unaltered parameters to keep track of the config.

parent 6ca4dcbd
No related branches found
No related tags found
1 merge request!1294Draft: Property refactor
......@@ -103,6 +103,6 @@ struct TransformParameters<const Allen::Store::StoreRef<T...>&> {
{
return TransformParametersImpl<
Allen::Store::StoreRef<T...>,
typename Allen::Store::StoreRef<T...>::parameters_tuple_t>::transform(t, config);
typename Allen::Store::StoreRef<T...>::unaltered_parameters_tuple_t>::transform(t, config);
}
};
......@@ -236,11 +236,13 @@ namespace Allen::Store {
* @brief Manager of argument references for every handler.
*/
template<
typename UnalteredParameterTuple,
typename ParameterTuple,
typename ParameterStruct,
typename InputAggregatesTuple = std::tuple<>>
struct StoreRef {
public:
using unaltered_parameters_tuple_t = UnalteredParameterTuple;
using parameters_tuple_t = ParameterTuple;
using parameters_struct_t = ParameterStruct;
using input_aggregates_t = typename AggregateTypes<InputAggregatesTuple>::aggregates_tuple_type_t;
......@@ -372,6 +374,7 @@ namespace Allen::Store {
struct WrappedTupleDetails<Tuple, std::index_sequence<>> {
using parameters_tuple_t = std::tuple<>;
using aggregates_tuple_t = std::tuple<>;
using unaltered_parameters_tuple_t = std::tuple<>;
};
template<typename Tuple, std::size_t I, std::size_t... Is>
......@@ -386,6 +389,8 @@ namespace Allen::Store {
using prev_parameters_tuple_t = typename prev_wrapped_tuple::parameters_tuple_t;
using parameters_tuple_t = prepend_to_tuple_t<boost::pfr::tuple_element_t<I, Tuple>, prev_parameters_tuple_t>;
using aggregates_tuple_t = typename prev_wrapped_tuple::aggregates_tuple_t;
using unaltered_parameters_tuple_t =
prepend_to_tuple_t<boost::pfr::tuple_element_t<I, Tuple>, typename prev_wrapped_tuple::unaltered_parameters_tuple_t>;
};
template<typename Tuple, std::size_t I, std::size_t... Is>
......@@ -397,6 +402,8 @@ namespace Allen::Store {
using parameters_tuple_t = typename prev_wrapped_tuple::parameters_tuple_t;
using aggregates_tuple_t =
prepend_to_tuple_t<boost::pfr::tuple_element_t<I, Tuple>, typename prev_wrapped_tuple::aggregates_tuple_t>;
using unaltered_parameters_tuple_t =
prepend_to_tuple_t<boost::pfr::tuple_element_t<I, Tuple>, typename prev_wrapped_tuple::unaltered_parameters_tuple_t>;
};
template<typename Tuple, std::size_t I, std::size_t... Is>
......@@ -410,6 +417,8 @@ namespace Allen::Store {
using prev_wrapped_tuple = WrappedTupleDetails<Tuple, std::index_sequence<Is...>>;
using parameters_tuple_t = typename prev_wrapped_tuple::parameters_tuple_t;
using aggregates_tuple_t = typename prev_wrapped_tuple::aggregates_tuple_t;
using unaltered_parameters_tuple_t =
prepend_to_tuple_t<boost::pfr::tuple_element_t<I, Tuple>, typename prev_wrapped_tuple::unaltered_parameters_tuple_t>;
};
template<size_t... Is>
......@@ -426,6 +435,7 @@ namespace Allen::Store {
template<typename T>
using ArgumentReferences = Allen::Store::StoreRef<
typename Allen::Store::WrappedTuple<T>::unaltered_parameters_tuple_t,
typename Allen::Store::WrappedTuple<T>::parameters_tuple_t,
T,
typename Allen::Store::WrappedTuple<T>::aggregates_tuple_t>;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment