Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
procpatt.cpp
Go to the documentation of this file.
1/*
2 ProcPatt - template for building some render processing network
3
4 Copyright (C)
5 2008, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
14
21#include "steam/asset/proc.hpp"
24#include "lib/util.hpp"
25
26using util::isnil;
27
28namespace steam {
29namespace asset {
30
31
34
35
36
43 : Struct (idi),
44 instructions_()
45 { }
46
47
50 : Struct (idi),
51 instructions_(instru)
52 {
53 TODO ("verify building instructions, maybe preprocess...");
54 }
55
56
57
65 ProcPatt::newCopy (string newID) const
66 {
67 TODO ("implement the Pattern-ID within the propDescriptor!");
68 TODO ("implement a consistent struct asset naming scheme at one central location!!!!!");
69 const Asset::Ident newIdi ( this->ident.name+".X"
70 , this->ident.category
71 );
72 ProcPatt* pP = new ProcPatt (newIdi, this->instructions_);
73 return AssetManager::instance().wrap (*pP);
74 }
75
76
83 {
84 DoAttach *last (0);
85 if ( not isnil (instructions_)
86 and (last = boost::get<DoAttach> (&(instructions_.back())))
87 and last->point==where
88 )
89 // instead of adding a new build instruct entry,
90 // we can extend the list in the last "DoAttach" entry.
91 last->nodes.push_back(node);
92 else
93 {
94 DoAttach entry(node, where);
95 BuildInstruct instruction(entry);
96 instructions_.push_back(instruction);
97 }
98 TODO ("declare dependency??");
99 return *this;
100 }
101
102
108 ProcPatt&
110 {
111 DoRecurse entry(toReuse);
112 instructions_.push_back(BuildInstruct (entry));
113 TODO ("declare dependency??");
114
115 return *this;
116 }
117
118
119
120
121}} // namespace asset
Steam-Layer Interface: Asset Lookup and Organisation.
Helper classes used by asset::ProcPatt to represent the processing information.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
Token or Atom with distinct identity.
Definition symbol.hpp:120
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
const Ident ident
Asset identification tuple.
Definition asset.hpp:197
"Processing Pattern" is a structural Asset representing information how to build some part of the ren...
Definition procpatt.hpp:54
ProcPatt & attach(Symbol where, PProc &node)
extend the processing instructions to add some Effect
Definition procpatt.cpp:82
ProcPatt(const Asset::Ident &, const InstructionSequence &)
Definition procpatt.cpp:49
~ProcPatt()
emit VTable and member destructors here...
Definition procpatt.cpp:33
ProcPatt & operator+=(PProcPatt &toReuse)
extend the processing instructions by reference to another ProcPatt, which will be "executed" at this...
Definition procpatt.cpp:109
InstructionSequence instructions_
Definition procpatt.hpp:55
lib::P< ProcPatt > newCopy(string newID) const
create a new ProcPatt asset as a literal copy of this one.
Definition procpatt.cpp:65
key abstraction: structural asset Created automatically as a sideeffect of building the structure of ...
Definition struct.hpp:105
The asset subsystem of the Steam-Layer.
vector< BuildInstruct > InstructionSequence
Definition procpatt.hpp:45
Steam-Layer implementation namespace root.
bool isnil(lib::time::Duration const &dur)
Data processing Plugins and Codecs can be treated as a specific Kind of Asset.
Definition of a structural asset to express patterns of wiring or processing Processing patterns can ...
a POD comprised of all the information sufficiently identifying any given Asset.
Definition asset.hpp:147
string name
element ID, comprehensible but sanitised.
Definition asset.hpp:151
(Interface) building instructions to be executed by the Builder on the render node network under cons...
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...