mobject::builder::BuilderTool Class Reference

#include <buildertool.hpp>

List of all members.


Detailed 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 lumiera::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 107 of file buildertool.hpp.


Public Member Functions

void forgetWrapper ()
template<template< class > class WRA, class TAR>
void rememberWrapper (WRA< TAR > *ptr_toWrappedTarget)

Protected Member Functions

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

Private Attributes

lumiera::WrapperPtr currentWrapper_

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

Generated on Tue Jan 6 17:21:31 2009 for Lumiera by  doxygen 1.5.6