Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
frame-coord.hpp
Go to the documentation of this file.
1 /*
2  FRAME-COORD.hpp - unique distinct coordinates of a frame to be calculated
3 
4  Copyright (C) Lumiera.org
5  2012, 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 
29 #ifndef PROC_ENGINE_FRAME_COORD_H
30 #define PROC_ENGINE_FRAME_COORD_H
31 
32 #include "proc/common.hpp"
34 #include "lib/time/timevalue.hpp"
35 #include "lib/time/timequant.hpp"
36 
37 #include <limits>
38 
39 
40 namespace proc {
41 namespace engine {
42 
43  using mobject::ModelPort;
44  using lib::time::FrameCnt;
45  using lib::time::TimeVar;
46  using lib::time::Time;
47 
48 
65  struct FrameCoord
66  {
67 
70 
72 
73  ModelPort modelPort;
74  uint channelNr;
75 
76 
79  : absoluteNominalTime(Time::NEVER)
80  , absoluteFrameNumber(std::numeric_limits<FrameCnt>::max())
81  , absoluteRealDeadline(Time::NEVER)
82  , modelPort() // unconnected
83  , channelNr(0)
84  { }
85 
86  // using default copy operations
87 
90  bool
91  isDefined() const
92  {
93  return absoluteRealDeadline != Time::NEVER;
94  }
95  };
96 
97 
98 
110  {
111 
112  public:
113  virtual ~FrameSequencer();
114 
115  FrameCoord
117  {
118  return locateRelative (refPoint, +1 );
119  }
120 
121  protected:
122  virtual FrameCoord locateRelative (FrameCoord const&, FrameCnt frameOffset) =0;
123  };
124 
125 
126 
127 }} // namespace proc::engine
128 #endif
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
Definition: timevalue.hpp:142
Organising the output data calculation possibilities.
int64_t FrameCnt
Definition: job.h:94
FrameCoord()
build an undefined frame location
Definition: frame-coord.hpp:78
constexpr X const & max(X const &a, X const &b)
virtual ~FrameSequencer()
this is an interface
Definition: dispatcher.cpp:40
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
STL namespace.
virtual FrameCoord locateRelative(FrameCoord const &, FrameCnt frameOffset)=0
Facility for producing a sequence of FrameCoord.
Basic set of definitions and includes commonly used together.
Lumiera's internal time value datatype.
Definition: timevalue.hpp:226
Support library to represent grid-aligned time specifications This is part of Lumiera's time and time...
static const Time NEVER
border condition marker value. NEVER >= any time value
Definition: timevalue.hpp:241
effective coordinates of a frame to be calculated.
Definition: frame-coord.hpp:65
int64_t FrameCnt
relative framecount or frame number.
Definition: digxel.hpp:321
Proc-Layer implementation namespace root.
Definition: id-scheme.hpp:63
a family of time value like entities and their relationships.
FrameCoord getNextFrame(FrameCoord refPoint)