Lumiera  0.pre.03
»edit your freedom«
grid.hpp
Go to the documentation of this file.
1 /*
2  GRID.hpp - time scale grid abstraction
3 
4  Copyright (C) Lumiera.org
5  2011, 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 
31 #ifndef LIB_TIME_GRID_H
32 #define LIB_TIME_GRID_H
33 
34 #include "lib/time/timevalue.hpp"
35 
36 #include <memory>
37 
38 
39 namespace lib {
40 namespace time {
41 
42 
67  class Grid
68  {
69  public:
70  virtual ~Grid();
71 
72 
73  virtual FrameCnt gridPoint (TimeValue const& raw) const =0;
74  virtual TimeValue gridLocal (TimeValue const& raw) const =0;
75  virtual TimeValue timeOf (FrameCnt gridPoint) const =0;
76  virtual TimeValue timeOf (FSecs gridTime, int=0) const =0;
77  };
78 
80 
81 
82 
83 }} // lib::time
84 #endif
virtual ~Grid()
this is an Interface
Definition: quantiser.cpp:57
Implementation namespace for support and library code.
boost::rational< int64_t > FSecs
rational representation of fractional seconds
Definition: timevalue.hpp:229
Abstraction of a value alignment grid.
Definition: grid.hpp:67
int64_t FrameCnt
relative framecount or frame number.
Definition: digxel.hpp:321
a family of time value like entities and their relationships.
basic constant internal time value.
Definition: timevalue.hpp:142