Lumiera  0.pre.03
»edit your freedom«
config-flags-test.cpp File Reference

Go to the source code of this file.

Description

build a type representing a single configuration defined by a set of flags

The semi-automatic assembly of processing node invocation code utilises some metaprogramming to generate a factory, which in turn produces node wiring objects according to the configuration to be used for the corresponding ProcNode. This relies on generating a distinct type based on a given set of configuration flags, which is covered by this test.

See also
configflags.hpp
typelistmanip.hpp
nodewiring-config.hpp real world usage example

Definition in file config-flags-test.cpp.

Classes

class  ConfigFlags_test
 
struct  Indeed
 
struct  Maybe< CONF >
 a type which is only partially defined, for some configs. More...
 
struct  Maybe< Conf1 >
 
struct  Maybe< Conf3 >
 
struct  Maybe< Config< TWO, Fl > >
 
struct  ConfigFlags_test::TestFactory< CONF >
 
struct  ConfigFlags_test::TestVisitor
 

Typedefs

typedef CombineFlags< AllFlags > AllFlagCombinations
 
typedef Flags< ONE, TWO, THR, FOU >::Tuple AllFlags
 
typedef Config Conf0
 
typedef Config< ONE > Conf1
 
typedef Config< TWO > Conf2
 
typedef Config< THR > Conf3
 
typedef Config< TWO, FOU > Conf4
 
typedef Flags< ONE, THR >::Tuple Flags1
 
typedef Flags< TWO, FOU >::Tuple Flags2
 
typedef Types< Flags1, Flags2 > SomeFlagsets
 

Enumerations

enum  Cases {
  ONE = 1,
  TWO,
  THR,
  FOU,
  NUM_Cases = FOU,
  NOT_SET = 0
}
 

Macros

#define CAN_INSTANTIATE(NAME)
 
#define INVOKE_CONFIG_SELECTOR(CODE)
 
#define PRINT_DELIMITER(TITLE)
 

Functions

 LAUNCHER (ConfigFlags_test, "unit common")
 Register this test class... More...
 

Namespaces

 lib
 Implementation namespace for support and library code.
 

Macro Definition Documentation

◆ PRINT_DELIMITER

#define PRINT_DELIMITER (   TITLE)
Value:
cout << "__________________________\n" \
"__________________________ " \
<< STRINGIFY(TITLE) << "\n";
#define STRINGIFY(TOKEN)
this macro wraps its parameter into a cstring literal
Definition: util.hpp:441

Definition at line 115 of file config-flags-test.cpp.

◆ CAN_INSTANTIATE

#define CAN_INSTANTIATE (   NAME)
Value:
cout << "defined " \
<< STRINGIFY(NAME) \
<< "? ---> " \
<< Instantiation<Maybe>::Test<NAME>::value << "\n";
#define STRINGIFY(TOKEN)
this macro wraps its parameter into a cstring literal
Definition: util.hpp:441

◆ INVOKE_CONFIG_SELECTOR

#define INVOKE_CONFIG_SELECTOR (   CODE)
Value:
cout << " Flag-code = " << CODE \
<< " ConfigSelector() ---> " \
<< testConfigSelector[CODE] () << "\n";

Class Documentation

◆ lib::meta::test::anonymous_namespace{config-flags-test.cpp}::Maybe

struct lib::meta::test::anonymous_namespace{config-flags-test.cpp}::Maybe
+ Collaboration diagram for Maybe< CONF >:

Function Documentation

◆ LAUNCHER()

lib::meta::test::LAUNCHER ( ConfigFlags_test  ,
"unit common"   
)

Register this test class...