Lumiera  0.pre.03
»edityourfreedom«
explicitplacement.hpp
Go to the documentation of this file.
1 /*
2  EXPLICITPLACEMENT.hpp - special Placement yielding an absolute location (Time,Output) for a MObject
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 
39 #ifndef PROC_MOBJECT_EXPLICITPLACEMENT_H
40 #define PROC_MOBJECT_EXPLICITPLACEMENT_H
41 
43 
44 
45 
46 namespace proc {
47 namespace mobject {
48 
49 
50 
62  class ExplicitPlacement : public Placement<MObject>
63  {
64  public:
65  const Time time;
66  const Pipe pipe;
67 
68  typedef std::pair<Time,Pipe> SolutionData; //TODO (ichthyo considers better passing of solution by subclass)
69 
74  virtual
76  {
77  return *this;
78  }
79 
80 
81  protected:
82  /* @todo ichthyo considers a much more elegant implementation utilising a subclass
83  * of FixedLocation, which would serve as Placement::LocatingSolution, and
84  * would be used as LocatingPin::chain subobject as well, so that it could
85  * be initialised directly here in the ExplicitPlacement ctor.
86  * (ichthyo: see Trac #100)
87  */
88  ExplicitPlacement (const Placement<MObject>& base, const SolutionData found)
89  : Placement<MObject>(base),
90  time(found.first), pipe(found.second)
91  { };
92 
94 
95  private:
98  };
99 
100 
101 
102 }} // namespace proc::mobject
103 #endif /*PROC_MOBJECT_EXPLICITPLACEMENT_H*/
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
Definition: trait.hpp:87
ExplicitPlacement & operator=(const ExplicitPlacement &)
copying prohibited, ExplicitPlacement is effectively const!
Core abstraction: placement of a media object into session context.
virtual ExplicitPlacement resolve() const
no need to resolve any further, as this ExplicitPlacement already is the result of a resolve()-call...
Special kind of Placement, where the location of the MObject has been nailed down to a fixed position...
enable_if< treat_as_STL_Container< COLL >, typename COLL::reference > first(COLL const &coll)
access the first element of a STL-like container.
Definition: util-coll.hpp:107
Proc-Layer implementation namespace root.
Definition: id-scheme.hpp:63
std::pair< Time, Pipe > SolutionData
MObject is the interface class for all "Media Objects".
Definition: mobject.hpp:79
ExplicitPlacement(const Placement< MObject > &base, const SolutionData found)