Lumiera  0.pre.03
»edit your freedom«
pipe.cpp
Go to the documentation of this file.
1 /*
2  Pipe - structural asset denoting a processing pipe to generate media output
3 
4  Copyright (C) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
29 #include "steam/asset/pipe.hpp"
30 #include "steam/assetmanager.hpp"
31 #include "lib/util.hpp"
32 
33 using util::isnil;
34 
35 namespace steam {
36 namespace asset {
37 
38 
46  Pipe::Pipe ( const Asset::Ident& idi
47  , string const& streamID
48  , PProcPatt& wiring
49  , string shortName
50  , string longName
51  )
52  : Struct (idi)
53  , wiringTemplate_(wiring)
54  , streamID_(streamID)
55  , shortDesc (shortName)
56  , longDesc (longName)
57  {
58  REQUIRE (idi.isValid());
59  if (isnil (shortDesc))
60  shortDesc = string(idi);
61  }
62 
63 
64 
65  PPipe
66  Pipe::query (string const& properties)
67  {
68  return Struct::retrieve (Query<Pipe> (properties));
69  }
70 
71 
75  PPipe
77  {
78  return AssetManager::instance().getAsset(id);
79  }
80 
81 
82  void
84  {
85  wiringTemplate_ = another;
86  TODO ("trigger rebuild fixture");
87  }
88 
89 
90 
91 
92 }} // namespace asset
Steam-Layer Interface: Asset Lookup and Organisation.
A "processing pipe" represented as Asset.
Pipe(Asset::Ident const &, string const &streamID, PProcPatt &wiring, string shortName="", string longName="")
Create and register a new Pipe asset.
Definition: pipe.cpp:46
Steam-Layer implementation namespace root.
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
static StructFactory retrieve
storage for the static StructFactory instance
Definition: struct.hpp:116
static PPipe lookup(ID< Pipe > id)
convenience shortcut for lookup by id
Definition: pipe.cpp:76
a POD comprised of all the information sufficiently identifying any given Asset.
Definition: asset.hpp:158
void switchProcPatt(PProcPatt &another)
use another wiring template.
Definition: pipe.cpp:83
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
static PPipe query(string const &properties)
convenience shortcut for retrieving default configured pipes
Definition: pipe.cpp:66
key abstraction: structural asset Created automatically as a sideeffect of building the structure of ...
Definition: struct.hpp:113
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:44
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
Definition: query.hpp:279