Sygaldry
Loading...
Searching...
No Matches
sygac-components: Components Concepts

Concepts

concept  sygaldry::SimpleAggregate
 Ensure T is not a union and is either scalar or aggregate. Doesn't catch inheritance!
 
concept  sygaldry::has_main_subroutine
 
concept  sygaldry::has_init_subroutine
 
concept  sygaldry::has_external_sources_subroutine
 
concept  sygaldry::has_external_destinations_subroutine
 
concept  sygaldry::Component
 Check if T is a Sygaldry component.
 
concept  sygaldry::Assembly
 

Classes

struct  sygaldry::main_subroutine_reflection< T >
 Default case for main subroutine reflection where the main subroutine does not exist. More...
 
struct  sygaldry::main_subroutine_reflection< T >
 Main subroutine reflection for function call operator; this takes precedence over a method called "main". More...
 
struct  sygaldry::init_subroutine_reflection< T >
 Default case for init subroutine reflection where the init subroutine does not exist. More...
 
struct  sygaldry::init_subroutine_reflection< T >
 Init subroutine reflection for a method called "init". More...
 
struct  sygaldry::external_sources_subroutine_reflection< T >
 Default case for external sources subroutine reflection where the subroutine does not exist. More...
 
struct  sygaldry::external_sources_subroutine_reflection< T >
 External sources subroutine reflection for a method of the same name. More...
 
struct  sygaldry::external_destinations_subroutine_reflection< T >
 Default case for external destinations subroutine reflection where the subroutine does not exist. More...
 
struct  sygaldry::external_destinations_subroutine_reflection< T >
 External destinations subroutine reflection for a method of the same name. More...
 
struct  sygaldry::tagged< Tag, Val >
 
struct  sygaldry::tagged_is_same< T >
 
struct  sygaldry::_search_by_tags< RequestedNodes >
 

Macros

#define has_type_or_value(NAME)
 

Typedefs

template<typename Tag >
using sygaldry::untagged = typename Tag::type
 
template<typename T >
using sygaldry::output_endpoints_t = decltype(remove_node_tags(component_filter_by_tag< node::output_endpoint >(std::declval< T & >())))
 
template<typename T >
using sygaldry::input_endpoints_t = decltype(remove_node_tags(component_filter_by_tag< node::input_endpoint >(std::declval< T & >())))
 
template<typename T >
using sygaldry::endpoints_t = decltype(remove_node_tags(component_filter_by_tag< node::input_endpoint, node::output_endpoint >(std::declval< T & >())))
 
template<typename T , typename C >
using sygaldry::path_t = decltype(remove_node_tags(path_of< T >(std::declval< C & >())))
 

Functions

 sygaldry::has_type_or_value (inputs)
 
 sygaldry::has_type_or_value (outputs)
 
template<typename Tag , typename T >
constexpr auto sygaldry::endpoint_subtree (T &component)
 
template<typename T >
constexpr auto sygaldry::component_to_tree (T &component)
 
template<Tuple T>
constexpr auto sygaldry::component_tree_to_node_list (T tree)
 
template<typename T >
constexpr auto sygaldry::component_to_node_list (T &component)
 
template<template< typename >typename F>
constexpr auto sygaldry::node_list_filter (Tuple auto tup)
 
template<template< typename >typename F, typename T >
constexpr auto sygaldry::component_filter (T &component)
 
template<typename T >
constexpr auto & sygaldry::find (Tuple auto tup)
 
template<typename T >
constexpr auto & sygaldry::find (auto &component)
 
template<typename ... RequestedNodes>
constexpr auto sygaldry::node_list_filter_by_tag (Tuple auto tup)
 
template<typename ... RequestedNodes>
constexpr auto sygaldry::component_filter_by_tag (auto &component)
 
template<typename ... RequestedNodes>
constexpr auto sygaldry::for_each_node_in_list (const Tuple auto node_list, auto callback)
 
template<typename T , Tuple Tup>
constexpr auto sygaldry::path_of (const Tup tree)
 
template<typename T , typename C >
requires Component<C> || Assembly<C>
constexpr auto sygaldry::path_of (C &component)
 
template<Tuple T>
constexpr auto sygaldry::remove_node_tags (T tup)
 
template<typename T , typename ... RequestedNodes>
constexpr auto sygaldry::for_each_node (T &component, auto callback)
 
template<typename T >
constexpr void sygaldry::for_each_component (T &component, auto callback)
 
template<typename T >
constexpr void sygaldry::for_each_endpoint (T &component, auto callback)
 
template<typename T >
constexpr void sygaldry::for_each_input (T &component, auto callback)
 
template<typename T >
constexpr void sygaldry::for_each_output (T &component, auto callback)
 
template<typename Y >
void sygaldry::clear_flag (Y &endpoint)
 
void sygaldry::clear_flags (auto &component)
 
void sygaldry::clear_output_flags (auto &component)
 
void sygaldry::clear_input_flags (auto &component)
 
template<Component T>
void sygaldry::init (T &component)
 
template<Component T>
void sygaldry::activate_inner (T &component)
 
template<Component T>
void sygaldry::activate (T &component)
 

Detailed Description

Macro Definition Documentation

◆ has_type_or_value

#define has_type_or_value (   NAME)
Value:
template<typename T> concept has_##NAME = requires (T t)\
{\
t.NAME;\
requires SimpleAggregate<decltype(t.NAME)>;\
};\
\
template<has_##NAME T> struct type_of_##NAME\
{\
using type = decltype(std::declval<T>().NAME);\
};\
\
template<typename T> using NAME##_t = typename type_of_##NAME<T>::type;\
\
template<typename T> requires has_##NAME<T> constexpr auto& NAME##_of(T& t) { return t.NAME; }\
template<typename T> requires has_##NAME<T> constexpr const auto& NAME##_of(const T& t) { return t.NAME; }\