draft some steps of the dispatch operation

This commit is contained in:
Fischlurch 2012-02-09 22:24:05 +01:00
parent 6772e94994
commit 568fadd526
4 changed files with 48 additions and 8 deletions

View file

@ -25,7 +25,9 @@
#define PROC_ENGINE_DISPATCHER_H
#include "proc/common.hpp"
#include "proc/state.hpp"
//#include "proc/state.hpp"
#include "proc/engine/time-anchor.hpp"
#include "proc/engine/frame-coord.hpp"
#include "lib/time/timevalue.hpp"
#include <boost/noncopyable.hpp>
@ -52,6 +54,8 @@ namespace engine {
virtual ~Dispatcher(); ///< this is an interface
virtual FrameCoord locateFrameNext (uint frameCountOffset) =0;
};

View file

@ -34,8 +34,9 @@
namespace proc {
namespace engine {
using lib::time::TimeSpan;
using lib::time::FSecs;
//using lib::time::TimeSpan;
using lib::time::Duration;
//using lib::time::FSecs;
using lib::time::Time;
//
// class ExitNode;
@ -58,6 +59,9 @@ namespace engine {
{
public:
Time absoluteNominalTime;
int64_t absoluteFrameNumber;
FrameCoord()
{
UNIMPLEMENTED ("anything regarding the Node Invocation");
@ -65,6 +69,13 @@ namespace engine {
// using default copy operations
Duration remainingRealTime()
{
UNIMPLEMENTED ("deterine the real wall clock time amount left until deadline");
}
};

View file

@ -27,15 +27,16 @@
#include "proc/common.hpp"
//#include "proc/state.hpp"
#include "lib/time/timevalue.hpp"
#include "proc/play/timings.hpp"
namespace proc {
namespace engine {
using lib::time::TimeSpan;
using lib::time::FSecs;
using lib::time::Time;
// using lib::time::TimeSpan;
// using lib::time::FSecs;
// using lib::time::Time;
//
// class ExitNode;
@ -57,13 +58,24 @@ namespace engine {
class TimeAnchor
{
public:
TimeAnchor()
{
UNIMPLEMENTED ("anything regarding the Engine backbone");
}
public:
// using default copy operations
static TimeAnchor
build (play::Timings timings, uint64_t startFrame)
{
UNIMPLEMENTED ("representation of the Time Anchor closure");
}
operator lib::time::TimeValue() const
{
UNIMPLEMENTED ("representation of the Time Anchor closure");
}
};

View file

@ -45,6 +45,7 @@ namespace test {
using lib::time::QuTime;
using lib::time::FrameRate;
using lib::time::Duration;
using proc::play::Timings;
namespace { // used internally
@ -54,6 +55,12 @@ namespace test {
: public Dispatcher
{
FrameCoord
locateFrameNext (uint frameCountOffset)
{
UNIMPLEMENTED ("dummy implementation of the core dispatch operation");
}
public:
};
@ -92,11 +99,17 @@ namespace test {
verify_basicDispatch()
{
Dispatcher& dispatcher = mockDispatcher();
#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #880
Timings timings (FrameRate::PAL);
uint startFrame(10);
TimeAnchor refPoint = TimeAnchor::build (timings, startFrame);
CHECK (refPoint == Time::ZERO + Duration(10, FrameRate::PAL));
FrameCoord coordinates = dispatcher.locateFrameNext (15);
CHECK (coordinates.absoluteNominalTime == Time(0,1));
CHECK (coordinates.absoluteFrameNumber == 25);
CHECK (coordinates.remainingRealTime() >= Time(FSecs(24,25)));
#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #880
#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #880
}