Lumiera  0.pre.03
»edit your freedom«
fake-configrules.hpp File Reference

Go to the source code of this file.

Description

Mock/Test/Debugging Implementation of the config rules system.

Instead of actually parsing/analysing/resolving queries, this implementation uses a Table of hard wired queries together with preconfigured object instances as answer values. As of 1/2008 it is used to "keep the implementation work going" – later on, when we use a real Prolog interpreter, it still may be useful for testing and debugging.

Remarks
the primary purpose of this header and fake-configrules.cpp is to define the type specialisations of the QueryHandler<TY>::resolve(solution,query) function(s). Below, there is a really confusing and ugly ping-pong game involving the faked solutions and the mocked defaults manager. This is spaghetti code, written for the reason everyone writes spaghetti code: to get away with it. So please look away, some day the real thing will be there, displacing this mess without further notice.
Todo:
to be removed in Alpha, when integrating a real resolution engine /////////////////TICKET #710
See also
lumiera::Query
lumiera::ConfigRules

Definition in file fake-configrules.hpp.

#include "steam/mobject/session.hpp"
#include "steam/config-resolver.hpp"
#include "lib/depend-inject.hpp"
#include "lib/query-util.hpp"
#include "lib/util.hpp"
#include "lib/p.hpp"
#include <boost/any.hpp>
#include <string>
#include <map>

Classes

class  LookupPreconfigured< TY, BASE >
 building block providing the mock implementation for a single type. More...
 
class  MockConfigRules
 Facade: Dummy Implementation of the query interface. More...
 
class  MockTable
 the actual table holding preconfigured answers packaged as boost::any objects. More...
 
struct  WrapReturn< TY >
 a traits-class to define the smart-ptr to wrap the result More...
 
struct  WrapReturn< ProcPatt >
 

Functions

template<typename WRA >
bool exists (WRA const &solution)
 
template<typename TY >
bool is_defaults_query (Query< TY > const &querySpec)
 helper detecting if a query actually intended to retrieve a "default" object. More...
 

Namespaces

 steam
 Steam-Layer implementation namespace root.
 
 steam::mobject
 Media-Objects, edit operations and high-level session.
 
 steam::mobject::session
 Namespace of Session and user visible high-level objects.
 

Class Documentation

◆ steam::mobject::session::query::anonymous_namespace{fake-configrules.hpp}::WrapReturn

struct steam::mobject::session::query::anonymous_namespace{fake-configrules.hpp}::WrapReturn
Class Members
typedef P< TY > Wrapper
+ Collaboration diagram for WrapReturn< TY >:

◆ steam::mobject::session::query::anonymous_namespace{fake-configrules.hpp}::WrapReturn< ProcPatt >

struct steam::mobject::session::query::anonymous_namespace{fake-configrules.hpp}::WrapReturn< ProcPatt >
Class Members
typedef PProcPatt Wrapper
+ Collaboration diagram for WrapReturn< ProcPatt >: