From 1969adaf02cc281c6070e1bfb8361c5648b57709 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 5 Sep 2009 18:15:58 +0200 Subject: [PATCH] Integration of Builder/NodeFactory implementation draft. Stubbed to pass compiler --- src/lib/frameid.hpp | 2 +- src/proc/engine/bufftable.hpp | 2 +- src/proc/engine/nodefactory.cpp | 7 +- src/proc/engine/nodeinvocation.hpp | 12 ++- src/proc/engine/nodeoperation.hpp | 64 +++++++++----- src/proc/engine/nodewiring-config.hpp | 2 +- src/proc/engine/nodewiring-def.hpp | 31 +++++-- src/proc/engine/nodewiring.cpp | 11 +-- src/proc/engine/nodewiring.hpp | 8 +- src/proc/engine/procnode.hpp | 17 ++-- src/proc/engine/rendergraph.cpp | 8 ++ src/proc/mobject/builder/nodecreatortool.cpp | 7 ++ src/proc/mobject/builder/nodecreatortool.hpp | 86 +++++++++---------- src/proc/mobject/builder/operationpoint.cpp | 25 +++++- src/proc/mobject/builder/operationpoint.hpp | 11 ++- src/proc/mobject/builder/segmentationtool.cpp | 22 +++++ src/proc/mobject/builder/segmentationtool.hpp | 9 +- src/proc/mobject/builder/toolfactory.cpp | 18 ++-- src/proc/mobject/session/edl.cpp | 8 ++ src/proc/mobject/session/edl.hpp | 3 +- src/proc/mobject/session/effect.cpp | 9 +- src/proc/mobject/session/effect.hpp | 3 +- src/proc/mobject/session/segmentation.hpp | 2 +- tests/common/refarraytest.cpp | 4 +- .../proc/engine/buff-table-test.cpp | 12 +-- .../proc/engine/node-basic-test.cpp | 11 ++- 26 files changed, 256 insertions(+), 138 deletions(-) diff --git a/src/lib/frameid.hpp b/src/lib/frameid.hpp index ce70f16d0..1e0f2af78 100644 --- a/src/lib/frameid.hpp +++ b/src/lib/frameid.hpp @@ -51,7 +51,7 @@ namespace lumiera { static ulong currID; }; - ulong NodeID::currID (0); + /** diff --git a/src/proc/engine/bufftable.hpp b/src/proc/engine/bufftable.hpp index e091f940c..7ec679f72 100644 --- a/src/proc/engine/bufftable.hpp +++ b/src/proc/engine/bufftable.hpp @@ -137,7 +137,7 @@ namespace engine { tab_(storage.claim (siz_)), sto_(storage) { - const uint nrO(wd.getNrO()); + const uint nrO(wd.nrO); // Setup the public visible table locations this->outHandle = &tab_.first[ 0 ]; diff --git a/src/proc/engine/nodefactory.cpp b/src/proc/engine/nodefactory.cpp index 3c7299c21..d8dbfa01d 100644 --- a/src/proc/engine/nodefactory.cpp +++ b/src/proc/engine/nodefactory.cpp @@ -47,10 +47,9 @@ namespace engine { intendedWiring.resolveProcessor(effect->getProcAsset()); WiringDescriptor& wiring = wiringFac_(intendedWiring); - PNode newNode = alloc_.create (wiring); - ENSURE (newNode); - ENSURE (newNode->isValid()); - return newNode; + ProcNode& newNode = alloc_.create (wiring); + ENSURE (newNode.isValid()); + return &newNode; } diff --git a/src/proc/engine/nodeinvocation.hpp b/src/proc/engine/nodeinvocation.hpp index 13dbbd383..1d57280f4 100644 --- a/src/proc/engine/nodeinvocation.hpp +++ b/src/proc/engine/nodeinvocation.hpp @@ -88,7 +88,7 @@ namespace engine { - private: /* === proxying the State interface === */ + public: /* === proxying the State interface === */ virtual void releaseBuffer (BuffHandle& bh) { current_.releaseBuffer (bh); } @@ -96,6 +96,8 @@ namespace engine { virtual BuffHandle fetch (FrameID const& fID) { return current_.fetch (fID); } + virtual BuffTableStorage& getBuffTableStorage() { return current_.getBuffTableStorage(); } + // note: allocateBuffer() is chosen specifically based on the actual node wiring }; @@ -132,9 +134,10 @@ namespace engine { buffTab(0) { } - const uint nrO() const { return wiring.nrO; } - const uint nrI() const { return wiring.nrI; } - const uint buffTabSize() const { return nrO()+nrI(); } + public: + uint nrO() const { return wiring.nrO; } + uint nrI() const { return wiring.nrI; } + uint buffTabSize() const { return nrO()+nrI(); } /** setup the link to an externally allocated buffer table */ void setBuffTab (BuffTable* b) { this->buffTab = b; } @@ -208,6 +211,7 @@ namespace engine { template class ActualInvocationProcess : public BufferProvider + , private Strategy { public: ActualInvocationProcess (State& callingProcess, WiringDescriptor const& w, const uint outCh) diff --git a/src/proc/engine/nodeoperation.hpp b/src/proc/engine/nodeoperation.hpp index 838b9a31f..cc8a29137 100644 --- a/src/proc/engine/nodeoperation.hpp +++ b/src/proc/engine/nodeoperation.hpp @@ -76,15 +76,37 @@ namespace config { /** * Base class of all concrete invocation sequences. - * Could contain a collection of functions used to build up the invocation sequence. - * Currently contains just a marker used to detect the existence of an concrete + * Provides a collection of functions used to build up the invocation sequence. + * Additionally providing a marker used to detect the existence of an concrete * definition/specialisation for a given specific configuration. */ - class OperationBase + struct OperationBase { typedef lumiera::Yes_t is_defined; + BuffHandle + getSource (Invocation& ivo, uint chanNo) + { + UNIMPLEMENTED ("retrieve source data provided by the backend/scheduler"); + } + BuffHandle + pullPredecessor (Invocation& ivo, uint chanNo) + { + UNIMPLEMENTED ("invoke pull() on the denoted predecessor node"); + } + + void + releaseBuffers(BuffHandle* table, uint slotCnt, uint slot_to_retain) //////////////TODO this is going to be implemented rather by smart-handle, Ticket #249 + { + UNIMPLEMENTED ("release all buffers with the exception of the desired output"); + } + + bool + validateBuffers (Invocation& ivo) + { + UNIMPLEMENTED ("Do a final, specifically tailored validation step on the buffers prior to invoking the procees function"); + } }; @@ -130,8 +152,8 @@ namespace config { for (uint i = 0; i < ivo.nrI(); ++i ) { - inBuff[i] = - *(inH[i] = this->pullPredecessor(ivo,i)); // invoke predecessor + inBuff[i] = + &*(inH[i] = this->pullPredecessor(ivo,i)); // invoke predecessor // now Input #i is ready... } return NEXT::step (ivo); @@ -155,7 +177,7 @@ namespace config { for (uint i = 0; i < ivo.nrI(); ++i ) { inBuff[i] = outBuff[i] = - *(inH[i] = outH[i] = this->getSource(ivo,i)); + &*(inH[i] = outH[i] = this->getSource(ivo,i)); // now Input #i is ready... } return NEXT::step (ivo); @@ -177,7 +199,7 @@ namespace config { for (uint i = 0; i < ivo.nrO(); ++i ) { outBuff[i] = - *(outH[i] = ivo.allocateBuffer (ivo.wiring.out[i].bufferType)); + &*(outH[i] = ivo.allocateBuffer (ivo.wiring.out[i].bufferType)); // now Output buffer for channel #i is available... } return NEXT::step (ivo); @@ -197,7 +219,7 @@ namespace config { // Invoke our own process() function, // providing the array of outBuffer+inBuffer ptrs - ivo.wiring.procFunction (ivo.buffTab->outBuff); + (*ivo.wiring.procFunction) (*ivo.buffTab->outBuff); return NEXT::step (ivo); } @@ -254,25 +276,21 @@ namespace config { }; - - template< char CACHE_Fl =NOT_SET - , char INPLACE_Fl =NOT_SET - > - struct SelectBuffProvider; - - template<> struct SelectBuffProvider { typedef AllocBufferFromCache Type; }; - template<> struct SelectBuffProvider { typedef AllocBufferFromParent Type; }; - template<> struct SelectBuffProvider { typedef AllocBufferFromCache Type; }; - template<> struct SelectBuffProvider<> { typedef AllocBufferFromParent Type; }; + using lumiera::typelist::Config; + ///////////////////////TODO: selecting this way isn't especially readable, + ///////////////////////////: but BufferProvider selection is going to be solved differently anyway, see Ticket #249 + template + struct SelectBuffProvider { typedef AllocBufferFromParent Type; }; + template + struct SelectBuffProvider< Config > { typedef AllocBufferFromCache Type; }; template struct Strategy ; - using lumiera::typelist::Config; - template - struct Strategy< Config > + template + struct Strategy< Config > : QueryCache< AllocBufferTable< PullInput< @@ -283,8 +301,8 @@ namespace config { OperationBase > > > > > > > { }; - template - struct Strategy< Config > + template + struct Strategy< Config > : AllocBufferTable< PullInput< AllocOutput< diff --git a/src/proc/engine/nodewiring-config.hpp b/src/proc/engine/nodewiring-config.hpp index 47d0eb395..6271199fd 100644 --- a/src/proc/engine/nodewiring-config.hpp +++ b/src/proc/engine/nodewiring-config.hpp @@ -63,8 +63,8 @@ namespace engine { namespace config { - using lumiera::typelist::FlagInfo; using util::contains; + using lumiera::typelist::FlagInfo; using lumiera::typelist::CONFIG_FLAGS_MAX; diff --git a/src/proc/engine/nodewiring-def.hpp b/src/proc/engine/nodewiring-def.hpp index c5f37c2bc..4fc4f14c2 100644 --- a/src/proc/engine/nodewiring-def.hpp +++ b/src/proc/engine/nodewiring-def.hpp @@ -75,13 +75,32 @@ namespace engine { long flags_; asset::Proc::ProcFunc* function_; - protected: - RefArray& makeOutDescriptor() ; - RefArray& makeInDescriptor() ; - WiringDescriptor::ProcFunc* resolveProcessingFunction() ; - lumiera::NodeID const& createNodeID() ; + public: /* === API for querying collected data === */ + RefArray& + makeOutDescriptor() const + { + UNIMPLEMENTED ("build new output descriptors for the node under construction"); //////////TODO: where to get the information about the output channels??? + } + + RefArray& + makeInDescriptor() const + { + UNIMPLEMENTED ("build new input descriptors for the node under construction"); + } + + WiringDescriptor::ProcFunc* + resolveProcessingFunction() const + { + REQUIRE (function_); + return function_; + } + + lumiera::NodeID const& + createNodeID() const + { + UNIMPLEMENTED ("initiate generation of a new unique node-ID"); // see rendergraph.cpp + } - friend class NodeWiring; public: /* === API for specifying the desired wiring === */ diff --git a/src/proc/engine/nodewiring.cpp b/src/proc/engine/nodewiring.cpp index f32b02bf3..f59d620db 100644 --- a/src/proc/engine/nodewiring.cpp +++ b/src/proc/engine/nodewiring.cpp @@ -55,12 +55,6 @@ namespace engine { typedef Filter::Test> PossibleConfigs; - #define PICK_FLAG(_FLAG_) config::FlagInfo::CODE & (_FLAG_) - - template - struct UseBufferProvider - : config::SelectBuffProvider< PICK_FLAG (CACHING), PICK_FLAG (INPLACE) > - { }; // internal details: setting up a factory for each required configuration @@ -76,9 +70,8 @@ namespace engine { AllocationCluster& alloc_; /* ==== pick actual wiring code ==== */ - typedef Strategy Strategy; - typedef typename UseBufferProvider::Type BuffProvider; - typedef ActualInvocationProcess InvocationStateType; + typedef typename SelectBuffProvider::Type BuffProvider; + typedef ActualInvocationProcess, BuffProvider> InvocationStateType; // the concrete implementation of the glue code... typedef NodeWiring ActualWiring; diff --git a/src/proc/engine/nodewiring.hpp b/src/proc/engine/nodewiring.hpp index abc369fa2..7d2882d45 100644 --- a/src/proc/engine/nodewiring.hpp +++ b/src/proc/engine/nodewiring.hpp @@ -61,17 +61,15 @@ namespace engine { : public WiringDescriptor { - NodeWiring(WiringSituation& setup) + public: + NodeWiring(WiringSituation const& setup) : WiringDescriptor(setup.makeOutDescriptor(), setup.makeInDescriptor(), setup.resolveProcessingFunction(), setup.createNodeID()) { } - friend class WiringFactory; - - - protected: + private: virtual BuffHandle callDown (State& currentProcess, uint requestedOutputNr) const { diff --git a/src/proc/engine/procnode.hpp b/src/proc/engine/procnode.hpp index be54a32c4..40bbe15f3 100644 --- a/src/proc/engine/procnode.hpp +++ b/src/proc/engine/procnode.hpp @@ -113,6 +113,13 @@ namespace engine { /** * Key abstraction of the Render Engine: A Data processing Node + * + * @todo it's not clear as of 9/09 if ProcNode shall be an ABC/Interface + * It might be used as ABC (as was the original intention) when implementing + * several query/information functions. In that case, the ctor will become protected. + * The alternative would be to push down these information-retrieval part into a + * configurable element within WiringDescriptor, in which case we even might drop + * ProcNode as a frontent entirely. */ class ProcNode { @@ -121,19 +128,15 @@ namespace engine { const WiringDescriptor& wiringConfig_; - protected: + public: ProcNode (WiringDescriptor const& wd) : wiringConfig_(wd) { } - - - friend class NodeFactory; + virtual ~ProcNode() {}; /////////////////////////TODO: do we still intend to build a hierarchy below ProcNode??? public: - virtual ~ProcNode() {}; /////////////////////////TODO: do we still intend to build a hierarchy below ProcNode??? - bool isValid() const; /** output channel count */ @@ -161,7 +164,7 @@ namespace engine { }; - bool + inline bool ProcNode::isValid() const { UNIMPLEMENTED ("ProcNode validity self-check"); diff --git a/src/proc/engine/rendergraph.cpp b/src/proc/engine/rendergraph.cpp index a031deb70..c2ab6e332 100644 --- a/src/proc/engine/rendergraph.cpp +++ b/src/proc/engine/rendergraph.cpp @@ -22,8 +22,16 @@ #include "proc/engine/rendergraph.hpp" +#include "lib/frameid.hpp" #include "proc/state.hpp" +namespace lumiera { + + /** storage for the unique node-ID counter */ + ulong NodeID::currID (0); +} + + namespace engine { /** */ diff --git a/src/proc/mobject/builder/nodecreatortool.cpp b/src/proc/mobject/builder/nodecreatortool.cpp index ed24e36c2..8664a2b01 100644 --- a/src/proc/mobject/builder/nodecreatortool.cpp +++ b/src/proc/mobject/builder/nodecreatortool.cpp @@ -58,6 +58,13 @@ namespace mobject { NodeCreatorTool::treat (Auto& automation) { } + + + void + NodeCreatorTool::onUnknown (Buildable& target) + { + UNIMPLEMENTED ("catch-all when partitioning timeline"); ////////TODO: verify why this gets enfoced here... + } diff --git a/src/proc/mobject/builder/nodecreatortool.hpp b/src/proc/mobject/builder/nodecreatortool.hpp index f39fefb61..4d3d04b9c 100644 --- a/src/proc/mobject/builder/nodecreatortool.hpp +++ b/src/proc/mobject/builder/nodecreatortool.hpp @@ -21,57 +21,55 @@ */ -#ifndef MOBJECT_BUILDER_NODECREATERTOOL_H -#define MOBJECT_BUILDER_NODECREATERTOOL_H +#ifndef MOBJECT_BUILDER_NODECREATORTOOL_H +#define MOBJECT_BUILDER_NODECREATORTOOL_H #include "proc/mobject/builder/applicablebuildertargettypes.hpp" #include "proc/engine/rendergraph.hpp" -#include "proc/mobject/builder/toolfactory.hpp" namespace mobject { - namespace builder { - - - - - /** - * This Tool implementation plays the central role in the build process: - * given a MObject from Session, it is able to attach ProcNodes to the - * render engine under construction such as to reflect the properties - * of the MObject in the actual render. - */ - class NodeCreatorTool - : public ApplicableBuilderTargetTypes - { - ToolFactory& toolKit_; - - /** holds the RenderGraph (Render Engine Element) - * to be built by the current build step */ - engine::RenderGraph& proc_; - - - NodeCreatorTool (ToolFactory& tofa, engine::RenderGraph& proc) - : toolKit_(tofa), - proc_(proc) - { } - - friend class ToolFactory; - - public: - virtual void treat (mobject::session::Clip& clip) ; - virtual void treat (mobject::session::Effect& effect) ; - virtual void treat (mobject::session::Auto& automation) ; //TODO: the automation-type-problem - virtual void treat (mobject::Buildable& something) ; - - - - }; - - } // namespace mobject::builder - -} // namespace mobject +namespace builder { + + class ToolFactory; + + + /** + * This Tool implementation plays the central role in the build process: + * given a MObject from Session, it is able to attach ProcNodes to the + * render engine under construction such as to reflect the properties + * of the MObject in the actual render. + */ + class NodeCreatorTool + : public ApplicableBuilderTargetTypes + { + ToolFactory& toolKit_; + + /** holds the RenderGraph (Render Engine Element) + * to be built by the current build step */ + engine::RenderGraph& proc_; + + + NodeCreatorTool (ToolFactory& tofa, engine::RenderGraph& proc) + : toolKit_(tofa), + proc_(proc) + { } + + friend class ToolFactory; + + public: + virtual void treat (mobject::session::Clip& clip) ; + virtual void treat (mobject::session::Effect& effect) ; + virtual void treat (mobject::session::Auto& automation) ; //TODO: the automation-type-problem + virtual void treat (mobject::Buildable& something) ; + + void onUnknown (Buildable& target) ; /////////TODO why doesn't the treat(Buildable) function shaddow this?? + }; + + + +}} // namespace mobject::builder #endif diff --git a/src/proc/mobject/builder/operationpoint.cpp b/src/proc/mobject/builder/operationpoint.cpp index d08635fe5..5a6bbe3bf 100644 --- a/src/proc/mobject/builder/operationpoint.cpp +++ b/src/proc/mobject/builder/operationpoint.cpp @@ -22,7 +22,9 @@ #include "proc/mobject/builder/operationpoint.hpp" +#include "proc/engine/procnode.hpp" #include "proc/asset/media.hpp" +#include "proc/asset/proc.hpp" #include "proc/engine/nodefactory.hpp" #include "lib/streamtype.hpp" //#include "common/util.hpp" @@ -55,18 +57,33 @@ namespace builder { { } /** initiate a connection chain at a real source */ - RefPoint (NodeFactory& nFactory, asset::Media srcMedia) + RefPoint (NodeFactory& nFactory, asset::Media const& srcMedia) : alloc_(nFactory), - sources_(establishMediaChannels (srcMedia)), sType_(0) { + establishMediaChannels (srcMedia); deriveSourceStreamType (); } + + + private: + void + establishMediaChannels (asset::Media const& srcMedia) + { + UNIMPLEMENTED ("find out about the actual channels for this stream to connect"); + } + + void + deriveSourceStreamType () + { + UNIMPLEMENTED ("calculate / decide on the effective stream type used within this pipe"); + } + }; - OperationPoint::OperationPoint (NodeFactory& nFact,, asset::Media const& srcMedia) + OperationPoint::OperationPoint (NodeFactory& nFact, asset::Media const& srcMedia) : refPoint_(new RefPoint (nFact, srcMedia)) { } @@ -77,7 +94,7 @@ namespace builder { void - OperationPoint::attach (asset::PProc const& mediaProc) + OperationPoint::attach (asset::Proc const& mediaProc) { UNIMPLEMENTED ("Actually-really-finally create a node corresponding to this processing asset"); } diff --git a/src/proc/mobject/builder/operationpoint.hpp b/src/proc/mobject/builder/operationpoint.hpp index 2e24d63fe..329dbcebc 100644 --- a/src/proc/mobject/builder/operationpoint.hpp +++ b/src/proc/mobject/builder/operationpoint.hpp @@ -32,6 +32,10 @@ #include +namespace asset { class Proc; } +namespace asset { class Media; } +namespace engine { class NodeFactory; } + namespace mobject { namespace builder { @@ -52,11 +56,16 @@ namespace builder { boost::scoped_ptr refPoint_; public: + OperationPoint (engine::NodeFactory&, asset::Media const& srcMedia); + OperationPoint (RefPoint const& sourcePoint); + + + /** create node(s) corresponding to the given Processor-Asset * and wire them as a successor to this OperationPoint; then * move this point to refer to the resulting new exit node(s) */ - void attach (asset::PProc const&); + void attach (asset::Proc const&); /** connect the output this OperationPoint refers such as to * connect or combine with the input of the already existing diff --git a/src/proc/mobject/builder/segmentationtool.cpp b/src/proc/mobject/builder/segmentationtool.cpp index 7b6c29747..703f25150 100644 --- a/src/proc/mobject/builder/segmentationtool.cpp +++ b/src/proc/mobject/builder/segmentationtool.cpp @@ -35,24 +35,46 @@ namespace mobject { namespace builder { + + SegmentationTool::SegmentationTool(mobject::session::Fixture&) + { + UNIMPLEMENTED ("create new SegmentationTool"); + } + void SegmentationTool::treat (Buildable& something) { + UNIMPLEMENTED ("??? when partitioning timeline"); } void SegmentationTool::treat (Clip& clip) { + UNIMPLEMENTED ("consider clip when partitioning timeline"); } void SegmentationTool::treat (Effect& effect) { + UNIMPLEMENTED ("note applied effect when partitioning timeline"); + } + + + void + SegmentationTool::onUnknown (Buildable& target) + { + UNIMPLEMENTED ("catch-all when partitioning timeline"); } + + bool + SegmentationTool::empty() const + { + UNIMPLEMENTED ("detect an empty segmentation"); + } } // namespace mobject::builder diff --git a/src/proc/mobject/builder/segmentationtool.hpp b/src/proc/mobject/builder/segmentationtool.hpp index 8e55518d1..7106874c5 100644 --- a/src/proc/mobject/builder/segmentationtool.hpp +++ b/src/proc/mobject/builder/segmentationtool.hpp @@ -51,21 +51,24 @@ namespace mobject { : public ApplicableBuilderTargetTypes { + public: SegmentationTool (session::Fixture &) ; - public: void treat (mobject::session::Clip& clip) ; void treat (mobject::session::Effect& effect) ; void treat (mobject::Buildable& something) ; - //////////////////////////////////////////////////////////TODO make it respond to the util::isnil test! + void onUnknown (Buildable& target) ; /////////TODO why doesn't the treat(Buildable) function shaddow this?? + + bool empty() const; private: typedef mobject::session::Segment Segment; /** Partitioning of the Timeline to be created by this tool. */ - session::Segmentation& segments_; + //session::Segmentation& segments_; + ///////////////////////////////////////////TODO: either put it inline, or use a scopend_ptr!!!!!!!!!! }; diff --git a/src/proc/mobject/builder/toolfactory.cpp b/src/proc/mobject/builder/toolfactory.cpp index 278580754..abfa8c83c 100644 --- a/src/proc/mobject/builder/toolfactory.cpp +++ b/src/proc/mobject/builder/toolfactory.cpp @@ -40,7 +40,7 @@ namespace builder { session::Fixture & fixedTimeline_; auto_ptr procSegment_; - scoped_ptr segmentation_; + scoped_ptr segmentation_; scoped_ptr fabrication_; @@ -55,7 +55,7 @@ namespace builder { : state_(new BuildProcessState (theTimeline)) { ENSURE (state_->fixedTimeline_.isValid()); - ENSURE (state_->procSegment_); + ENSURE (state_->procSegment_.get()); } @@ -63,21 +63,21 @@ namespace builder { ToolFactory::configureSegmentation () { REQUIRE (state_->fixedTimeline_.isValid()); - REQUIRE (state_->procSegment_); + REQUIRE (state_->procSegment_.get()); - state->segmentation_.reset (new SegmentationTool (state->fixedTimeline_)); - return *(state->segmentation_); + state_->segmentation_.reset (new SegmentationTool (state_->fixedTimeline_)); + return *(state_->segmentation_); } NodeCreatorTool & ToolFactory::configureFabrication () //////////////////////TODO: should iterate in some way! { - REQUIRE (state_->procSegment_); - REQUIRE (!isnil (*(state_>segmentation))); + REQUIRE (state_->procSegment_.get()); + REQUIRE (!isnil (*(state_->segmentation_))); - state->fabrication_.reset (new NodeCreatorTool(*this)); - return *(state->fabrication_); + state_->fabrication_.reset (new NodeCreatorTool(*this, *state_->procSegment_)); + return *(state_->fabrication_); } diff --git a/src/proc/mobject/session/edl.cpp b/src/proc/mobject/session/edl.cpp index dd312c479..da131eee2 100644 --- a/src/proc/mobject/session/edl.cpp +++ b/src/proc/mobject/session/edl.cpp @@ -73,6 +73,14 @@ namespace mobject { UNIMPLEMENTED ("serch for a given 'thing' within the EDL"); } + + + bool + EDL::validate() + { + UNIMPLEMENTED ("self-check"); + return false; + } diff --git a/src/proc/mobject/session/edl.hpp b/src/proc/mobject/session/edl.hpp index 0e76c1a36..e72b91bad 100644 --- a/src/proc/mobject/session/edl.hpp +++ b/src/proc/mobject/session/edl.hpp @@ -62,7 +62,8 @@ namespace mobject { bool isValid() { return this->validate(); } private: - virtual bool validate() =0; + virtual bool validate(); + }; diff --git a/src/proc/mobject/session/effect.cpp b/src/proc/mobject/session/effect.cpp index e83f03119..ef856c0ff 100644 --- a/src/proc/mobject/session/effect.cpp +++ b/src/proc/mobject/session/effect.cpp @@ -28,7 +28,14 @@ namespace mobject namespace session { - /** */ + /** + * @TODO: clarify asset->mobject relation and asset dependencies; Ticket #255 + */ + asset::Proc const& + Effect::getProcAsset() const + { + UNIMPLEMENTED ("how to access the processing asset assotiated to a given Effect-MObject"); + } diff --git a/src/proc/mobject/session/effect.hpp b/src/proc/mobject/session/effect.hpp index 52b21bb54..6696558f1 100644 --- a/src/proc/mobject/session/effect.hpp +++ b/src/proc/mobject/session/effect.hpp @@ -48,7 +48,8 @@ namespace session { public: /** access the underlying processing asset */ - PProc getProcAsset () const; + asset::Proc const& getProcAsset () const; + //////////////////////TODO: clarify asset->mobject relation and asset dependencies; Ticket #255 }; diff --git a/src/proc/mobject/session/segmentation.hpp b/src/proc/mobject/session/segmentation.hpp index 4f4096a4e..2decf122c 100644 --- a/src/proc/mobject/session/segmentation.hpp +++ b/src/proc/mobject/session/segmentation.hpp @@ -48,7 +48,7 @@ namespace mobject { { /** segments of the engine in ordered sequence. */ - list segments_; + list segments_; }; diff --git a/tests/common/refarraytest.cpp b/tests/common/refarraytest.cpp index 1b9735926..627a00f46 100644 --- a/tests/common/refarraytest.cpp +++ b/tests/common/refarraytest.cpp @@ -21,8 +21,8 @@ * *****************************************************/ -#include "common/test/run.hpp" -#include "common/util.hpp" +#include "lib/test/run.hpp" +#include "lib/util.hpp" #include "lib/refarrayimpl.hpp" diff --git a/tests/components/proc/engine/buff-table-test.cpp b/tests/components/proc/engine/buff-table-test.cpp index fc55457b0..37404eafc 100644 --- a/tests/components/proc/engine/buff-table-test.cpp +++ b/tests/components/proc/engine/buff-table-test.cpp @@ -108,12 +108,12 @@ namespace test { return (b.outHandle == lastLevel ) // storage is allocated continuously && (b.outBuff <= b.inBuff ) // input slots are behind the output slots && (b.outHandle <= b.inHandle) - && (b.inBuff == &b.outBuff [num.getNrO()]) - && (b.inHandle == &b.outHandle[num.getNrO()]) - && (not_within(b.outBuff, b.outHandle, &b.inHandle[num.getNrO()])) // storage doesn't overlap - && (not_within(b.inBuff, b.outHandle, &b.inHandle[num.getNrO()])) - && (not_within(b.outHandle, b.outBuff, &b.inBuff[num.getNrO()])) - && (not_within(b.inHandle, b.outBuff, &b.inBuff[num.getNrO()])) + && (b.inBuff == &b.outBuff [num.nrO]) + && (b.inHandle == &b.outHandle[num.nrO]) + && (not_within(b.outBuff, b.outHandle, &b.inHandle[num.nrO])) // storage doesn't overlap + && (not_within(b.inBuff, b.outHandle, &b.inHandle[num.nrO])) + && (not_within(b.outHandle, b.outBuff, &b.inBuff[num.nrO])) + && (not_within(b.inHandle, b.outBuff, &b.inBuff[num.nrO])) ; } } // (End) internal defs diff --git a/tests/components/proc/engine/node-basic-test.cpp b/tests/components/proc/engine/node-basic-test.cpp index c3b89e802..c04d420c4 100644 --- a/tests/components/proc/engine/node-basic-test.cpp +++ b/tests/components/proc/engine/node-basic-test.cpp @@ -62,6 +62,12 @@ namespace test { }; + + inline PEffect + createTestEffectMObject() + { + UNIMPLEMENTED ("how to create a dummy Effect for tests"); + } } @@ -82,10 +88,7 @@ namespace test { WiringSituation setup(testSource); - setup.defineInput (4, predecessor1, 2); - setup.defineInput (2, predecessor2); - - PEffect pEffect; /////////////////TODO how to get an simple Effect MObject for Tests??? + PEffect pEffect = createTestEffectMObject(); ProcNode* pNode = nodeFab (pEffect, setup); ASSERT (pNode);