-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
6,479 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#pragma once | ||
|
||
namespace blocks { | ||
|
||
//============================================================================ | ||
// | ||
// ALIAS DECLARATIONS | ||
// | ||
//============================================================================ | ||
|
||
//**************************************************************************** | ||
/*!\brief Gets the nested `Variables` from `T` | ||
* \ingroup block_tt | ||
* | ||
* The variables_t alias declaration provides a convenient | ||
* shortcut to access the nested `Variables` type definition of | ||
* the given type \a T. The following code example shows both ways to access | ||
* the nested type definition: | ||
* | ||
* \example | ||
* \code | ||
* using Type1 = typename T::Variables; | ||
* using Type2 = variables_t<T>; | ||
* \endcode | ||
* | ||
* \see Block, BlockSlice | ||
*/ | ||
// [variables_t] | ||
template <typename T> | ||
using variables_t = typename T::Variables; | ||
// [variables_t] | ||
//**************************************************************************** | ||
|
||
//**************************************************************************** | ||
/*!\brief Gets the nested `InitializedVariables` from `T` | ||
* \ingroup block_tt | ||
* | ||
* The initialized_variables_t alias declaration provides a convenient | ||
* shortcut to access the nested `InitializedVariables` type definition of | ||
* the given type \a T. The following code example shows both ways to access | ||
* the nested type definition: | ||
* | ||
* \example | ||
* \code | ||
* using Type1 = typename T::InitializedVariables; | ||
* using Type2 = initialized_variables_t<T>; | ||
* \endcode | ||
* | ||
* \see Block, BlockSlice | ||
*/ | ||
// [initialized_variables_t] | ||
template <typename T> | ||
using initialized_variables_t = typename T::InitializedVariables; | ||
// [initialized_variables_t] | ||
//**************************************************************************** | ||
|
||
//**************************************************************************** | ||
/*!\brief Gets the nested `ComputedVariables` from `T` | ||
* \ingroup block_tt | ||
* | ||
* The computed_variables_t alias declaration provides a convenient | ||
* shortcut to access the nested `ComputedVariables` type definition of | ||
* the given type \a T. The following code example shows both ways to access | ||
* the nested type definition: | ||
* | ||
* \example | ||
* \code | ||
* using Type1 = typename T::ComputedVariables; | ||
* using Type2 = computed_variables_t<T>; | ||
* \endcode | ||
* | ||
* \see Block, BlockSlice | ||
*/ | ||
// [computed_variables_t] | ||
template <typename T> | ||
using computed_variables_t = typename T::ComputedVariables; | ||
// [computed_variables_t] | ||
//**************************************************************************** | ||
|
||
} // namespace blocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#pragma once | ||
|
||
//****************************************************************************** | ||
// Includes | ||
//****************************************************************************** | ||
|
||
#include "Utilities/AsTaggedTuple.hpp" | ||
|
||
namespace blocks { | ||
|
||
//**************************************************************************** | ||
/*!\brief Metafunction to define storage a typelist of block variables | ||
* \ingroup blocks | ||
* | ||
* \details | ||
* The as_block_variables template type helps obtain the heterogeneous | ||
* variable storage container from a typelist of declared blocks::Variable, | ||
* used as shown below. | ||
* | ||
* \example | ||
* \code | ||
* // ... Declare variables Var1, Var2, Var3 | ||
* | ||
* // TypeList of all variables | ||
* using VariablesList = tmpl::list<Var1, Var2, Var3>; | ||
* | ||
* // Convert into a storage type which has value semantics | ||
* using BlockVariables = as_block_variables<VariablesList>; | ||
* \endcode | ||
* | ||
* \tparam L typelist of block::Variables | ||
* | ||
* \see blocks::Variables, Block | ||
*/ | ||
template <typename L> | ||
using as_block_variables = tmpl::as_tagged_tuple<L>; | ||
//**************************************************************************** | ||
|
||
} // namespace blocks |
Oops, something went wrong.