Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
locatingpin.hpp
Go to the documentation of this file.
1/*
2 LOCATINGPIN.hpp - Chaining and constraining the Placement of a Media Object
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
37#ifndef STEAM_MOBJECT_SESSION_LOCATINGPIN_H
38#define STEAM_MOBJECT_SESSION_LOCATINGPIN_H
39
40
41#include "steam/common.hpp"
43
44#include <utility>
45#include <memory>
46
47
48
49
50namespace steam {
51namespace asset { class Pipe; }
52
53namespace mobject {
54
55 class MObject;
56
58//
59//template<class MO, class B=MObject>
60//class Placement ;
61//typedef Placement<MObject> PMO;
62
63 template<class MO>
64 class PlacementRef;
65
67
68
69 namespace session {
70
71 class FixedLocation;
72 class RelativeLocation;
73
74
75
89 {
90 protected:
94 typedef Time* Fork; //TODO dummy declaration; we don't use Tracks as first-class entity any longer. This role should be taken by the "Output Designation"
95 typedef std::shared_ptr<asset::Pipe> Pipe;
96 typedef std::pair<Time,Pipe> SolutionData; //TICKET #100 (ichthyo considers better passing of solution by subclass)
97 struct LocatingSolution;
98
100 std::unique_ptr<LocatingPin> next_;
101
103 virtual int getPrioLevel () const { return 0; }
104
106 void resolve (LocatingSolution&) const;
107 virtual void intersect (LocatingSolution&) const;
108
109 public:
110 const SolutionData resolve () const;
111 bool isOverdetermined () const;
112
113 /* Factory functions for adding LocatingPins */
114
115 FixedLocation& operator() (Time start, Fork track=0);
117
118 LocatingPin (const LocatingPin&);
120 virtual LocatingPin* clone () const;
121
122 virtual ~LocatingPin() {};
123
124// protected:
126
127//TODO (for working out the buildable interface; ctor should be protected)
128protected:
129
130// friend class Placement<MObject>;
131
141 {
144 Fork minTrack; // TODO don't use Tracks
146 bool impo;
147
149 : minTime(Time::MIN), // TODO: better implementation of "unspecified..."
150 maxTime(Time::MAX),
151 minTrack(0), // TODO
152 maxTrack(0),
153 impo(false)
154 { }
155
156 Time getTime ();
157 Pipe getPipe ();
158
159 bool is_definite ();
160 bool is_impossible ();
161 bool still_to_solve ();
162
163 };
164
165 friend bool operator== (LocatingPin const&, LocatingPin const&);
166
167 };
168
169
172 inline bool
173 operator== (LocatingPin const& pin1, LocatingPin const& pin2)
174 {
176 return pin1.resolve().first == pin2.resolve().first;
177 }
178
179
180
181}}} // namespace steam::mobject::session
182#endif
Offset measures a distance in time.
a mutable time value, behaving like a plain number, allowing copy and re-accessing
Lumiera's internal time value datatype.
static const Time ZERO
Reference tag denoting a placement attached to the session.
The most common case of positioning a MObject in the Session: directly specifying a constant position...
A Fork serves as grouping device within the Session.
Definition fork.hpp:95
Positioning specification, possibly chained to further specifications.
LocatingPin & operator=(const LocatingPin &)
virtual LocatingPin * clone() const
std::pair< Time, Pipe > SolutionData
FixedLocation & operator()(Time start, Fork track=0)
std::shared_ptr< asset::Pipe > Pipe
virtual void intersect(LocatingSolution &) const
friend bool operator==(LocatingPin const &, LocatingPin const &)
check for equivalent definition of a complete locating chain
void resolve(LocatingSolution &) const
virtual int getPrioLevel() const
order to consider when resolving.
const SolutionData resolve() const
implementing the core Placement functionality.
std::unique_ptr< LocatingPin > next_
next additional Pin, if any
LocatingPin & addChain(LocatingPin *)
The asset subsystem of the Steam-Layer.
Namespace of Session and user visible high-level objects.
Definition sequence.hpp:65
bool operator==(LocatingPin const &pin1, LocatingPin const &pin2)
check for equivalent definition of a complete locating chain
PlacementRef< MObject > PlaRef
TODO: as of 5/09 the idea is to phase out direct dependency on the placement class and recast those d...
Steam-Layer implementation namespace root.
Basic set of definitions and includes commonly used together.
Time getTime()
get some time value which could stand in for this solution.
a family of time value like entities and their relationships.
#define MAX(A, B)
the inevitable MAX macro, sometimes still necessary in template code
Definition util.hpp:518