Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
pipe.hpp
Go to the documentation of this file.
1/*
2 PIPE.hpp - structural asset denoting a processing pipe generating 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
24#ifndef ASSET_PIPE_H
25#define ASSET_PIPE_H
26
29#include "steam/streamtype.hpp"
30#include "common/query.hpp"
31
32#include <string>
33
34
35
36namespace steam {
37namespace asset {
38
39 using lumiera::Query;
40 using std::string;
41
42 class Pipe;
44
45
46 template<>
47 class ID<Pipe> : public ID<Struct>
48 {
49 public:
50 ID (HashVal id);
51 ID (Pipe const&);
52 ID (PPipe const&);
53
56 operator PPipe() const;
57
60 StreamType::ID streamType() const;
61 };
62
63
64
70 class Pipe
71 : public Struct
72 {
75
76 public:
77 string shortDesc;
78 string longDesc;
79
80 virtual const ID<Pipe>& getID() const
81 {
82 return static_cast<const ID<Pipe>& > (Asset::getID());
83 }
84
85
86 protected:
87 Pipe (Asset::Ident const&, string const& streamID, PProcPatt& wiring, string shortName ="", string longName ="") ;
88// friend class StructFactory;
89 friend class StructFactoryImpl;
90
91 public:
92 string const& getPipeID() const { return ident.name; }
94 PProcPatt const& getProcPatt() const { return wiringTemplate_; }
95
96
98 void switchProcPatt (PProcPatt& another);
99
101 static PPipe query (string const& properties);
102
104 static PPipe lookup (ID<Pipe> id);
105 };
106
107
108 // catch up with postponed definition of ID<Struct> ctors...
109 //
110 inline ID<Pipe>::ID(HashVal id) : ID<Struct> (id) {};
111 inline ID<Pipe>::ID(Pipe const& pipe) : ID<Struct> (pipe.getID()) {};
112 inline ID<Pipe>::ID(PPipe const& pipe) : ID<Struct> (pipe->getID()) {};
113
114 inline
116 {
117 return Pipe::lookup(*this);
118 }
119
120 inline StreamType::ID
122 {
123 return Pipe::lookup(*this)->getStreamID();
124 }
125
126
127
128
129}} // namespace steam::asset
130#endif
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
Definition query.hpp:254
const Ident ident
Asset identification tuple.
Definition asset.hpp:197
virtual const ID< Asset > & getID() const
Definition asset.hpp:199
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
Definition asset.hpp:98
ID(HashVal id)
Definition asset.hpp:101
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
Definition pipe.hpp:72
string longDesc
Definition pipe.hpp:78
PProcPatt const & getProcPatt() const
Definition pipe.hpp:94
virtual const ID< Pipe > & getID() const
<
Definition pipe.hpp:80
StreamType::ID getStreamID() const
Definition pipe.hpp:93
static PPipe query(string const &properties)
convenience shortcut for retrieving default configured pipes
Definition pipe.cpp:57
string const & getPipeID() const
Definition pipe.hpp:92
void switchProcPatt(PProcPatt &another)
use another wiring template.
Definition pipe.cpp:74
StreamType::ID streamID_
Definition pipe.hpp:74
PProcPatt wiringTemplate_
Definition pipe.hpp:73
string shortDesc
Definition pipe.hpp:77
static PPipe lookup(ID< Pipe > id)
convenience shortcut for lookup by id
Definition pipe.cpp:67
Implementation details, especially concerning how configuration queries are resolved and when to crea...
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.
lib::P< Pipe > PPipe
Definition pipe.hpp:43
Steam-Layer implementation namespace root.
Definition of a structural asset to express patterns of wiring or processing Processing patterns can ...
Basic and generic representation of an internal query.
Framework for classification of media streams.
Asset representation of structural elements within the model.
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