Lumiera  0.pre.03
»edit your freedom«
output-designation.hpp
Go to the documentation of this file.
1 /*
2  OUTPUT-DESIGNATION.hpp - specifying a desired output destination
3 
4  Copyright (C)
5  2010, 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 
31 #ifndef STEAM_MOBJECT_OUTPUT_DESIGNATION_H
32 #define STEAM_MOBJECT_OUTPUT_DESIGNATION_H
33 
34 #include "steam/asset/pipe.hpp"
35 #include "lib/hash-value.h"
36 #include "lib/opaque-holder.hpp"
38 
39 
40 namespace steam {
41 namespace mobject {
42 
43  namespace mp = lib::meta;
44 
45  class MObject;
46 
47  template<class MX>
48  class PlacementRef;
49 
51 
52 
53 
72  {
73  public:
75  using PPipe = asset::PPipe;
76 
77  explicit OutputDesignation (PID explicitTarget);
78  explicit OutputDesignation (RefPlacement const& indirectTarget);
79  explicit OutputDesignation (uint relative_busNr =0);
80 
81  // using default copying
82 
83 
94  PID
95  resolve (PPipe origin)
96  {
97  return spec_->resolve (origin);
98  }
99 
100  //TODO: API to retrieve target stream type
101 
102 
104  {
105  public:
106  virtual ~TargetSpec();
107  virtual PID resolve (PPipe origin) =0;
108  };
109 
110  private:
111  enum
112  { VTABLE = sizeof(size_t)
113  , SPEC_SIZ = VTABLE
114  + mp::maxSize<
116  };
118 
119 
121  SpecBuff spec_;
122 
123  };
124 
125 
126 
127 }} // namespace steam::mobject
128 #endif /*STEAM_MOBJECT_OUTPUT_DESIGNATION_H*/
Reference tag denoting a placement attached to the session.
SpecBuff spec_
Storage to hold the Target Spec inline.
PID resolve(PPipe origin)
retrieve the direct destination this descriptor is actually pointing to.
A "processing pipe" represented as Asset.
Steam-Layer implementation namespace root.
Metafunction " max( sizeof(T) ) for T in TYPES ".
Helper allowing type erasure while holding the actual object inline.
PlacementRef< MObject > RefPlacement
frequently-used shorthand
Descriptor to denote the desired target of produced media data.
Hash value types and utilities.
OutputDesignation(PID explicitTarget)
create an output designation by directly specifying the target to connect
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:71
Metaprogramming: Helpers for manipulating lists-of-types.
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
Definition: asset.hpp:99