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)
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 
20 #include "steam/asset/pipe.hpp"
21 #include "steam/assetmanager.hpp"
22 #include "lib/util.hpp"
23 
24 using util::isnil;
25 
26 namespace steam {
27 namespace asset {
28 
29 
37  Pipe::Pipe ( const Asset::Ident& idi
38  , string const& streamID
39  , PProcPatt& wiring
40  , string shortName
41  , string longName
42  )
43  : Struct (idi)
44  , wiringTemplate_(wiring)
45  , streamID_(streamID)
46  , shortDesc (shortName)
47  , longDesc (longName)
48  {
49  REQUIRE (idi.isValid());
50  if (isnil (shortDesc))
51  shortDesc = string(idi);
52  }
53 
54 
55 
56  PPipe
57  Pipe::query (string const& properties)
58  {
59  return Struct::retrieve (Query<Pipe> (properties));
60  }
61 
62 
66  PPipe
68  {
69  return AssetManager::instance().getAsset(id);
70  }
71 
72 
73  void
75  {
76  wiringTemplate_ = another;
77  TODO ("trigger rebuild fixture");
78  }
79 
80 
81 
82 
83 }} // 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:37
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:107
static PPipe lookup(ID< Pipe > id)
convenience shortcut for lookup by id
Definition: pipe.cpp:67
a POD comprised of all the information sufficiently identifying any given Asset.
Definition: asset.hpp:149
void switchProcPatt(PProcPatt &another)
use another wiring template.
Definition: pipe.cpp:74
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:57
key abstraction: structural asset Created automatically as a sideeffect of building the structure of ...
Definition: struct.hpp:104
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:35
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
Definition: query.hpp:270