Lumiera  0.pre.03
»edit your freedom«
BuilderTool Class Reference

#include "steam/mobject/builder/buildertool.hpp"

Description

Base class of all BuilderTools, used according to the visitor pattern: each Tool contains the concrete implementation for one task to be done to the various MObject classes.

The concrete builder tool implementation should not directly inherit from this base interface, but rather through an instantiation of the "Applicable" template parametrised with all concrete Buildable classes, for which it wants calls to be dispatched.

In addition to lib::visitor::Tool, BuilderTool adds support for dealing with objects normally handled by means of smart-pointers or similar wrappers, most notably mobject::Placement. The visitation is initiated by calling the stand-alone function (BuilderTool& tool, WRA& wrappedTargetObj) , which forwards to the visitation mechanism supported by the type contained in the wrapper, but stores away a pointer to the wrapped object, which can be retrieved in a typesafe manner from within the treat(ConcreteType&) function.
Note
retrieving the wrapper is not threadsafe and not reentrant, as we simply store a pointer within the BuilderTool instance.

Definition at line 106 of file buildertool.hpp.

Public Member Functions

void forgetWrapper ()
 
template<template< class > class WRA, class TAR >
void rememberWrapper (WRA< TAR > *ptr_toWrappedTarget)
 
template<template< class, class > class Placement, class TAR , class B >
void rememberWrapper (Placement< TAR, B > *ptr_toWrappedTarget)
 
- Public Member Functions inherited from Tool< void, InvokeCatchAllFunction >
virtual Tag< ToolBasegetTag ()=0
 use RTTI for all visiting tools More...
 

Protected Member Functions

ExplicitPlacement getExplicitPlacement ()
 
template<class TAR >
Placement< TAR > & getPlacement ()
 
template<class TAR >
lib::P< TAR > getPtr ()
 

Private Attributes

lumiera::WrapperPtr currentWrapper_
 

Additional Inherited Members

- Public Types inherited from Tool< void, InvokeCatchAllFunction >
typedef void ReturnType
 Tool function invocation return type.
 
typedef Tool ToolBase
 for templating the Tag and Dispatcher
 
+ Inheritance diagram for BuilderTool:
+ Collaboration diagram for BuilderTool:

The documentation for this class was generated from the following file: