rereading (and rewrapping) the builder/engine code...

started this a long time ago, then got sidelined....
This commit is contained in:
Fischlurch 2010-12-09 22:43:32 +01:00
parent ee56ab36a0
commit 8802beb753
7 changed files with 64 additions and 45 deletions

View file

@ -24,10 +24,10 @@
#include "proc/engine/renderengine.hpp"
namespace engine {
/** */
} // namespace engine

View file

@ -32,19 +32,26 @@
using std::list;
namespace engine
{
namespace engine {
/**
* @todo this is planned to become the frontend
* to the render node network, which can be considered
* at the lower end of the middle layer; the actual
* render operations are mostly implemented by the backend
* ////////TODO WIP as of 12/2010
*/
class RenderEngine : public RenderGraph
{
public:
///// TODO: find out about the public operations
// note: the play controller lives in the backend
// note: the play controller lives in the proc-layer,
// but is a subsystem separate of the sesison.
private:
list<RenderGraph> renderSegments;
};
} // namespace engine

View file

@ -26,17 +26,17 @@
#include "proc/state.hpp"
namespace lumiera {
/** storage for the unique node-ID counter */
ulong NodeID::currID (0);
}
namespace engine {
/** */
} // namespace engine

View file

@ -29,25 +29,27 @@
namespace engine
{
namespace engine {
class ExitNode;
/**
* @todo likely to be reworked into the engine backbone /////////////TODO WIP as of 12/2010
*/
class RenderGraph
{
protected:
ExitNode * output;
/** begin of the timerange covered by this RenderGraph */
lumiera::Time start;
/**end (exclusive) of the timerange */
lumiera::Time end;
};
} // namespace engine
#endif

View file

@ -62,7 +62,7 @@
namespace mobject {
class Buildable;
namespace builder {
@ -105,7 +105,7 @@ namespace mobject {
* as we simply store a pointer within the BuilderTool instance.
*/
class BuilderTool
: public lumiera::visitor::Tool<void, InvokeCatchAllFunction>
: public lumiera::visitor::Tool<void, InvokeCatchAllFunction>
{
lumiera::WrapperPtr currentWrapper_;
@ -172,7 +172,9 @@ namespace mobject {
using lumiera::typelist::Types; // convenience for the users of "Applicable"
} // namespace mobject::builder
}// namespace mobject::builder
@ -185,8 +187,15 @@ namespace mobject {
namespace builder { // to be found by ADL
namespace builder {
/** to be picked up by ADL: redirect tool invocation for double dispatch.
* The purpose of this function is to apply a visitor, while the actual target
* is managed by a generic wrapper (smart-ptr). This template function serves
* to generate forwarding functions, which pass on the \c apply() call to the
* actual embedded target, while passing on the fully wrapped object for later
* referral and usage too.
*/
template<typename WRA>
inline Buildable::ReturnType
apply (BuilderTool& tool, WRA& wrappedTargetObj)
@ -195,8 +204,7 @@ namespace mobject {
wrappedTargetObj->apply (tool); // dispatch to suitable treat() function
tool.forgetWrapper();
}
} // namespace mobject::builder
} // namespace mobject
}} // namespace mobject::builder
#endif

View file

@ -30,8 +30,8 @@ namespace mobject {
using ::NOBUG_FLAG(memory);
NOBUG_CPP_DEFINE_FLAG_PARENT(buildermem, memory);
}
/**
* Main Operation of the Builder:
* create a render engine for a given part of the timeline
@ -41,7 +41,7 @@ namespace mobject {
{
//////////////////////TODO
}
} // namespace mobject

View file

@ -30,8 +30,8 @@
namespace mobject {
/**
* Provides unified access to the builder functionality.
* While individual components of the builder subsystem may be called
@ -44,12 +44,14 @@ namespace mobject {
/**
* Main Operation of the Builder:
* create a render engine for a given part of the timeline
* @deprecated thats a placeholder! the real invocation is now
* in the course of being worked out ////////////TODO 12/2010
*/
engine::RenderEngine & buildEngine () ;
// TODO: allocation, GC??????
};
} // namespace mobject
#endif