Lumiera  0.pre.03
»edit your freedom«
buildertool.hpp File Reference

Go to the source code of this file.

Description

Visiting-tool mechanism configured specifically for the Builder.

The Builder creates the render nodes network by applying several Builder Tools to the objects found in the Session and Fixture. These BuilderTool instances contain the details of the builder implementation.

As the objects to be treated are normally handled by smart-ptrs, BuilderTool provides a special facility for dealing with these wrapped objects. There are some liabilities.

  • each concrete Buildable subtype to be treated specifically needs to declare DEFINE_PROCESSABLE_BY(BuilderTool)
  • at the same time, the concrete BuilderTool subclass has to declare being Applicable to this concrete Buildable subtype. The recommended way of ensuring this, is to add an entry to applicable-builder-target-types.hpp and then derive the concrete BuilderTool subclass from ApplicableBuilderTargetTypes
  • when accessing the wrapper from within a treat() function, a suitable concrete wrapper type has to be specified. If the wrapper type used for invoking the BuilderTool (function apply(BuilderTool&, WrappedObject&)) can not be converted to this type requested from within the call, an assertion failure (or segmentation fault in a release build) will result.
See also
visitor.hpp
applicable-builder-target-types.hpp
buildertooltest.hpp
nodecreatertool.hpp

Definition in file buildertool.hpp.

Classes

class  Applicable< TOOLImpl, TYPELIST >
 declare the concrete types a BuilderTool may receive and treat. More...
 
class  Buildable
 Marker Interface for classes visitable by Builder tools. More...
 
class  BuilderTool
 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. More...
 
class  InvokeCatchAllFunction< RET >
 Policy invoking an catch-all function for processing an unknown tool / target pair, effectively enforcing the implementation of a catch-all function onUnknown(BASE&) More...
 

Functions

template<typename WRA >
Buildable::ReturnType apply (BuilderTool &tool, WRA &wrappedTargetObj)
 to be picked up by ADL: redirect tool invocation for double dispatch. More...
 

Namespaces

 steam
 Steam-Layer implementation namespace root.
 
 steam::mobject
 Media-Objects, edit operations and high-level session.
 
 steam::mobject::builder
 Namespace of the Builder, transforming high-level into low-level.