Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
grid.hpp
Go to the documentation of this file.
1/*
2 GRID.hpp - time scale grid abstraction
3
4 Copyright (C)
5 2011, 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
22#ifndef LIB_TIME_GRID_H
23#define LIB_TIME_GRID_H
24
26
27#include <memory>
28
29
30namespace lib {
31namespace time {
32
33
58 class Grid
59 {
60 public:
61 virtual ~Grid();
62
63
64 virtual FrameCnt gridPoint (TimeValue const& raw) const =0;
65 virtual Offset gridLocal (TimeValue const& raw) const =0;
66 virtual TimeValue timeOf (FrameCnt gridPoint) const =0;
67 virtual TimeValue timeOf (FSecs gridTime, int=0) const =0;
68 };
69
70 using PGrid = std::shared_ptr<const Grid>;
71
72
73
74}} // lib::time
75#endif
Abstraction of a value alignment grid.
Definition grid.hpp:59
virtual ~Grid()
this is an Interface
virtual TimeValue timeOf(FrameCnt gridPoint) const =0
virtual Offset gridLocal(TimeValue const &raw) const =0
virtual FrameCnt gridPoint(TimeValue const &raw) const =0
virtual TimeValue timeOf(FSecs gridTime, int=0) const =0
Offset measures a distance in time.
basic constant internal time value.
int64_t FrameCnt
relative framecount or frame number.
Definition digxel.hpp:310
std::shared_ptr< const Grid > PGrid
Definition grid.hpp:70
boost::rational< int64_t > FSecs
rational representation of fractional seconds
Implementation namespace for support and library code.
a family of time value like entities and their relationships.