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

Go to the source code of this file.

Description

what are we doing here??

the following test composes both an interface and the corresponding implementation by instantiating "building block" templates over a collection of types. The resulting class ends up inheriting a virtual function instantiated for each of the types in the list. (remember: normally the number and signature of all virtual functions need to be absolutely fixed in the class definition)

See also
typelist-test.cpp
generator.hpp
lumiera::query::ConfigRules a real world usage example

Definition in file generator-test.cpp.

#include "lib/test/run.hpp"
#include "lib/format-string.hpp"
#include "lib/meta/generator.hpp"
#include <iostream>
#include <string>

Classes

struct  BaseImpl
 
struct  Block< I >
 template for generating lots of different test types More...
 
class  DoIt< X, BASE >
 Use this building block for chaining corresponding implementation classes. More...
 
class  TakeIt< X >
 Use this building block for assembling an abstract interface. More...
 
class  TypeListGenerator_test
 

Typedefs

typedef InstantiateChained< TheTypes, DoIt, BaseImpl > NumberBabbler
 
typedef InstantiateForEach< TheTypes, TakeIt > TheInterface
 
typedef Types< Block< 1 >, Block< 2 >, Block< 3 >, Block< 5 >, Block< 8 >, Block< 13 > >::List TheTypes
 

Functions

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

Namespaces

 lib
 Implementation namespace for support and library code.
 

Function Documentation

◆ LAUNCHER()

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

Register this test class...