2007-08-08 04:50:02 +02:00
|
|
|
/*
|
2008-05-26 07:28:10 +02:00
|
|
|
OPERATIONPOINT.hpp - abstraction representing the point where to apply a build instruction
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-03-10 04:25:03 +01:00
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
2010-12-17 23:28:49 +01:00
|
|
|
published by the Free Software Foundation; either version 2 of
|
|
|
|
|
the License, or (at your option) any later version.
|
|
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2007-08-08 04:50:02 +02:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-05-26 07:28:10 +02:00
|
|
|
*/
|
2007-08-08 04:50:02 +02:00
|
|
|
|
|
|
|
|
|
2008-05-26 07:28:10 +02:00
|
|
|
#ifndef MOBJECT_BUILDER_OPERATIONPOINT_H
|
|
|
|
|
#define MOBJECT_BUILDER_OPERATIONPOINT_H
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2008-11-04 04:13:50 +01:00
|
|
|
//#include "proc/engine/procnode.hpp" /////TODO can we get rid of this header here?
|
2012-12-01 08:44:07 +01:00
|
|
|
//#include "common/query.hpp"
|
2014-08-17 08:03:21 +02:00
|
|
|
#include "lib/hash-standard.hpp"
|
2007-08-08 04:50:02 +02:00
|
|
|
|
2017-01-05 00:56:46 +01:00
|
|
|
#include <memory>
|
2008-05-27 07:22:27 +02:00
|
|
|
#include <vector>
|
|
|
|
|
#include <string>
|
2007-08-08 04:50:02 +02:00
|
|
|
|
|
|
|
|
|
2011-12-02 16:10:03 +01:00
|
|
|
namespace proc {
|
|
|
|
|
|
2009-09-05 18:15:58 +02:00
|
|
|
namespace asset { class Proc; }
|
|
|
|
|
namespace asset { class Media; }
|
|
|
|
|
namespace engine { class NodeFactory; }
|
|
|
|
|
|
2008-05-26 07:28:10 +02:00
|
|
|
namespace mobject {
|
2009-08-29 18:33:46 +02:00
|
|
|
namespace builder {
|
|
|
|
|
|
|
|
|
|
using std::vector;
|
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
|
|
struct RefPoint;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A point in the render node network under construction.
|
|
|
|
|
* By means of this unspecific reference, a ProcPatt is able
|
|
|
|
|
* to deal with this location and to execute a single elementary
|
|
|
|
|
* building operation denoted by a BuildInstruct at this point.
|
|
|
|
|
* Usually, the actual point is retrieved from a Mould
|
|
|
|
|
*/
|
|
|
|
|
class OperationPoint
|
|
|
|
|
{
|
2017-01-05 00:56:46 +01:00
|
|
|
std::unique_ptr<RefPoint> refPoint_;
|
2009-08-29 18:33:46 +02:00
|
|
|
|
|
|
|
|
public:
|
2009-09-05 18:15:58 +02:00
|
|
|
OperationPoint (engine::NodeFactory&, asset::Media const& srcMedia);
|
|
|
|
|
OperationPoint (RefPoint const& sourcePoint);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-29 18:33:46 +02:00
|
|
|
/** 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)
|
|
|
|
|
*/
|
2009-09-05 18:15:58 +02:00
|
|
|
void attach (asset::Proc const&);
|
2009-08-29 18:33:46 +02:00
|
|
|
|
|
|
|
|
/** connect the output this OperationPoint refers such as to
|
|
|
|
|
* connect or combine with the input of the already existing
|
|
|
|
|
* nodes accessible via the target OperationPoint.
|
|
|
|
|
*/
|
|
|
|
|
void join (OperationPoint& target);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-02 16:10:03 +01:00
|
|
|
}}} // namespace proc::mobject::builder
|
2008-05-26 07:28:10 +02:00
|
|
|
#endif
|