Lumiera
0.pre.03
»edit your freedom«
time-grid.hpp
Go to the documentation of this file.
1
/*
2
TIME-GRID.hpp - reference scale for quantised time
3
4
Copyright (C) Lumiera.org
5
2010, 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
48
#ifndef ASSET_META_TIME_GRID_H
49
#define ASSET_META_TIME_GRID_H
50
51
#include "
steam/asset/meta.hpp
"
52
#include "
lib/idi/entry-id.hpp
"
53
#include "
lib/time/grid.hpp
"
54
#include "
lib/time/timevalue.hpp
"
55
#include "
lib/symbol.hpp
"
56
57
58
59
namespace
steam
{
60
namespace
asset
{
61
namespace
meta {
62
63
using
lib::Symbol
;
64
using
lib::time::Time
;
65
using
lib::time::TimeVar
;
66
using
lib::time::TimeValue
;
67
using
lib::time::FrameRate
;
68
using
lib::time::FSecs
;
69
70
71
class
TimeGrid;
72
using
PGrid =
lib::P<TimeGrid>
;
73
using
GridID =
lib::idi::EntryID<TimeGrid>
;
74
75
86
class
TimeGrid
87
:
public
Meta
88
,
public
virtual
lib::time::Grid
89
{
90
91
public
:
92
/* === shortcut builder functions === */
93
static
PGrid
build
(
FrameRate
frames_per_second);
94
static
PGrid
build
(
Symbol
gridID,
FrameRate
frames_per_second);
95
static
PGrid
build
(
Symbol
gridID,
FrameRate
frames_per_second,
Time
origin);
96
97
protected
:
98
TimeGrid
(
GridID
const
&);
99
};
100
101
102
103
104
105
template
<>
106
struct
Builder
<
TimeGrid
>
107
{
108
string
id
;
109
110
FrameRate
fps;
111
TimeVar
origin;
112
118
lib::P<TimeGrid>
predecessor
;
119
125
Builder
(
string
const
& nameID =
""
)
126
: id {nameID}
127
, fps{1}
128
, origin{
TimeValue
(0)}
129
, predecessor{}
130
{ }
131
135
lib::P<TimeGrid>
commit();
136
137
};
138
139
}}}
// namespace steam::asset::meta
140
#endif
lib::time::TimeVar
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
Definition:
timevalue.hpp:241
steam::asset::meta::TimeGrid
Interface: a grid and scale definition for time quantisation.
Definition:
time-grid.hpp:86
lib::time::FrameRate
Framerate specified as frames per second.
Definition:
timevalue.hpp:664
steam::asset::Meta
key abstraction: metadata, parametrisation, customisation and similar organisational traits...
Definition:
asset/meta.hpp:118
lib::idi::EntryID
typed symbolic and hash ID for asset-like position accounting.
Definition:
entry-id.hpp:135
steam::asset::meta::TimeGrid::build
static PGrid build(FrameRate frames_per_second)
Definition:
time-grid.cpp:167
steam
Steam-Layer implementation namespace root.
Definition:
dummy-player-facade.h:46
lib::time::Time
Lumiera's internal time value datatype.
Definition:
timevalue.hpp:308
steam::asset::meta::TimeGrid::TimeGrid
TimeGrid(GridID const &)
Definition:
time-grid.cpp:57
steam::asset::Asset::id
const ID< Asset > id
Asset primary key.
Definition:
asset.hpp:221
lib::Symbol
Token or Atom with distinct identity.
Definition:
symbol.hpp:126
meta.hpp
Internal and organisational metadata.
grid.hpp
definition of a time grid abstraction for time and timecode handling.
symbol.hpp
Marker types to indicate a literal string and a Symbol.
lib::time::FSecs
boost::rational< int64_t > FSecs
rational representation of fractional seconds
Definition:
timevalue.hpp:229
entry-id.hpp
Bare symbolic and hash ID used for accounting of asset like entries.
steam::asset::meta::Builder
Building and configuring a meta asset.
Definition:
asset/meta.hpp:109
lib::P
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition:
trait.hpp:80
steam::asset::meta::Builder< TimeGrid >::Builder
Builder(string const &nameID="")
initialise to blank (zero).
Definition:
time-grid.hpp:125
lib::time::Grid
Abstraction of a value alignment grid.
Definition:
grid.hpp:67
timevalue.hpp
a family of time value like entities and their relationships.
steam::asset
The asset subsystem of the Steam-Layer.
Definition:
wrapperptr.hpp:44
lib::time::TimeValue
basic constant internal time value.
Definition:
timevalue.hpp:142
steam::asset::meta::Builder< TimeGrid >::predecessor
lib::P< TimeGrid > predecessor
when building a compound or variable grid, the predecessor is the grid active before the origin of th...
Definition:
time-grid.hpp:118
steam
asset
meta
time-grid.hpp
Generated on Sat Apr 20 2024 02:03:42 for Lumiera by
1.8.13