Lumiera  0.pre.03
»edityourfreedom«
configflags.hpp File Reference

Go to the source code of this file.

Description

Under some circumstances it is necessary to assemble functionality out of elementary building blocks.

Especially, this assembly can be expressed as template specialisations directed by a configuration type. Thus, the purpose of this header is to encode flag-like configurations as distinct types, which can be used to select such specialisations. Each possible configuration can be encoded as a list of flags, which allows to generate, filter and process those configurations. The final goal is to automatically generate a factory which is able to deliver objects configured according to the situation encoded in the flags.

Note
currently there is an inherent limitation to configurations defined by a maximum of 5 independent flags. While it is easy to increase this limit, you should consider that the final goal is to generate template instantiations, which would lead to more and more code bloat with growing number of possible combinations.
See also
proc::engine::config::Strategy usage example
proc::engine::config::ConfigSelector
typelist.hpp

Definition in file configflags.hpp.

Classes

struct  BuildConfigFromFlags< FLAGS, CONF >
 build a configuration type from a list-of-flags More...
 
struct  BuildConfigFromFlags< Node< Flag< Fl >, FLAGS >, CONF >
 
struct  Config< f1, f2, f3, f4, f5 >
 < distinct type representing a configuration More...
 
struct  ConfigSetFlag< Fl, CONF >
 
struct  ConfigSetFlag< Fl, Config< f1, f2, f3, f4, IGN > >
 set (prepend) the Flag to the given config More...
 
struct  DefineConfigByFlags< FLAGS >
 create a configuration type for the given list-of-flags More...
 
struct  Flag< bit >
 
struct  Flag< 0 >
 
struct  FlagInfo< FLAGS >
 Helper for calculating values and for invoking runtime code based on a given FlagTuple. More...
 
struct  FlagInfo< Node< CONF, TAIL > >
 
struct  FlagInfo< Node< Flag< ff >, FLAGS > >
 
struct  FlagInfo< NullType >
 
struct  Flags< f1, f2, f3, f4, f5 >
 

Variables

const size_t CONFIG_FLAGS_MAX
 

Namespaces

 lib
 Implementation namespace for support and library code.
 
 lib::meta
 

Class Documentation

◆ lib::meta::BuildConfigFromFlags

struct lib::meta::BuildConfigFromFlags
Class Members
typedef CONF Config
typedef Config Type
+ Inheritance diagram for BuildConfigFromFlags< FLAGS, CONF >:
+ Collaboration diagram for BuildConfigFromFlags< FLAGS, CONF >:

◆ lib::meta::BuildConfigFromFlags< Node< Flag< Fl >, FLAGS >, CONF >

struct lib::meta::BuildConfigFromFlags< Node< Flag< Fl >, FLAGS >, CONF >
Class Members
typedef ConfigSetFlag< Fl,
typename BuildConfigFromFlags
< FLAGS, CONF >::Config >
::Config
Config
typedef Config Type
+ Collaboration diagram for BuildConfigFromFlags< Node< Flag< Fl >, FLAGS >, CONF >:

◆ lib::meta::Config

struct lib::meta::Config
Class Members
typedef Flags< f1, f2, f3, f4,
f5 >::Tuple
Flags
typedef Flags List
+ Collaboration diagram for Config< f1, f2, f3, f4, f5 >:

◆ lib::meta::ConfigSetFlag

struct lib::meta::ConfigSetFlag
+ Collaboration diagram for ConfigSetFlag< Fl, CONF >:

◆ lib::meta::ConfigSetFlag< Fl, Config< f1, f2, f3, f4, IGN > >

struct lib::meta::ConfigSetFlag< Fl, Config< f1, f2, f3, f4, IGN > >
Class Members
typedef Config< Fl, f1, f2, f3,
f4 >
Config
+ Collaboration diagram for ConfigSetFlag< Fl, Config< f1, f2, f3, f4, IGN > >:

◆ lib::meta::Flag

struct lib::meta::Flag
Class Members
typedef Flag ID
+ Collaboration diagram for Flag< bit >:

◆ lib::meta::Flag< 0 >

struct lib::meta::Flag< 0 >
Class Members
typedef NullType ID
+ Collaboration diagram for Flag< 0 >:

◆ lib::meta::FlagInfo

struct lib::meta::FlagInfo
+ Collaboration diagram for FlagInfo< FLAGS >:

◆ lib::meta::Flags

struct lib::meta::Flags
Class Members
typedef Types< typename Flag
< f1 >::ID, typename Flag< f2 >
::ID, typename Flag< f3 >::ID,
typename Flag< f4 >::ID,
typename Flag< f5 >::ID >
::List
Tuple
typedef Tuple List
+ Collaboration diagram for Flags< f1, f2, f3, f4, f5 >: