re-read the code

OMG....
This commit is contained in:
Fischlurch 2013-01-11 16:48:28 +01:00
parent a2e4a23b30
commit d18e36708d
4 changed files with 37 additions and 28 deletions

View file

@ -25,7 +25,6 @@
#define PROC_ENGINE_FRAME_COORD_H
#include "proc/common.hpp"
//#include "proc/state.hpp"
#include "proc/mobject/model-port.hpp"
#include "lib/time/timevalue.hpp"
#include "lib/time/timequant.hpp"
@ -36,12 +35,9 @@ namespace proc {
namespace engine {
using mobject::ModelPort;
//using lib::time::TimeSpan;
using lib::time::Duration;
//using lib::time::FSecs;
using lib::time::TimeVar;
//
// class ExitNode;
/**
* effective coordinates of a frame to be calculated.

View file

@ -57,7 +57,22 @@ namespace engine {
//class ExitNode;
/**
/**
* View on the execution planning for a single calculation step.
* When this view-frontend becomes accessible, behind the scenes all
* the necessary information has be pulled and collected from the
* low-level model and the relevant rendering/playback configuration.
* Typically, clients will materialise this planning into a Job (descriptor)
* ready to be entered into the scheduler.
*
* JobPlanning is indeed a view; the represented planning information is not
* persisted (other then in the job to be created). The implementation draws
* on a recursive exploration of the corresponding JobTicket, which acts as
* a general blueprint for creating jobs within this segment of the timeline.
*
* @remarks on the implementation level, JobPlanning is used as "state core"
* for a PlanningState iterator, to visit and plan subsequently all
* the individual operations necessary to render a timeline chunk.
*/
class JobPlanning
{
@ -216,6 +231,14 @@ namespace engine {
/** this is the core operation to drive planning ahead:
* discover the prerequisites of some operation -- here
* "prerequisites" are those operations to be performed
* within separate Jobs beforehand.
* @note this function is intended to be flat-mapped (">>=")
* onto a tree-like monad representing the evaluation process.
*/
inline PlanningState
expandPrerequisites (JobPlanning const& calculationStep)
{
@ -225,8 +248,9 @@ namespace engine {
}
/**
* Abstraction: a Facility to establish frame coordinates
* and identify and access the execution plan for this frame.
@ -357,13 +381,11 @@ namespace engine {
{
public:
// JobPlanningSequence() { }
JobPlanningSequence(engine::FrameCoord startPoint, FrameLocator& locator)
: ExpandedPlanningSequence(
JobPlanningChunkStartPoint(
PlanningStepGenerator(startPoint,locator))
>>= expandPrerequisites)
>>= expandPrerequisites) // "flat map" (monad operation)
{ }
};

View file

@ -61,9 +61,8 @@ typedef struct lumiera_jobClosure* LumieraJobClosure;
/**
* invocation parameter for the individual
* frame calculation job. Embedded into the job descriptor
* and passed to #lumiera_job_invoke when triggering
* invocation parameter for the individual frame calculation job.
* Embedded into the job descriptor and passed to #lumiera_job_invoke when triggering
*/
struct lumiera_jobParameter_struct
{
@ -114,26 +113,21 @@ typedef lumiera_jobDescriptor* LumieraJobDescriptor;
#ifdef __cplusplus /* ============== C++ Interface ================= */
//#include "proc/common.hpp"
#include "lib/error.hpp"
//#include "proc/state.hpp"
#include "lib/time/timevalue.hpp"
//#include "lib/time/timequant.hpp"
namespace proc {
namespace engine {
//using lib::time::TimeSpan;
//using lib::time::Duration;
//using lib::time::FSecs;
using lib::time::TimeValue;
using lib::time::Time;
//
//class ExitNode;
using lib::time::TimeValue;
using lib::time::Time;
typedef lumiera_jobParameter const& JobParameter;

View file

@ -25,7 +25,6 @@
#define PROC_ENGINE_TIME_ANCHOR_H
#include "proc/common.hpp"
//#include "proc/state.hpp"
#include "backend/real-clock.hpp"
#include "lib/time/timevalue.hpp"
#include "proc/play/timings.hpp"
@ -38,12 +37,10 @@ namespace proc {
namespace engine {
using backend::RealClock;
// using lib::time::TimeSpan;
using lib::time::Offset;
// using lib::time::FSecs;
using lib::time::TimeVar;
using lib::time::Time;
// class ExitNode;
/**
* The process of playback or rendering is a continued series of exploration and evaluation.