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)
5
2010, 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
39
#ifndef ASSET_META_TIME_GRID_H
40
#define ASSET_META_TIME_GRID_H
41
42
#include "
steam/asset/meta.hpp
"
43
#include "
lib/idi/entry-id.hpp
"
44
#include "
lib/time/grid.hpp
"
45
#include "
lib/time/timevalue.hpp
"
46
#include "
lib/symbol.hpp
"
47
48
49
50
namespace
steam
{
51
namespace
asset
{
52
namespace
meta {
53
54
using
lib::Symbol
;
55
using
lib::time::Time
;
56
using
lib::time::TimeVar
;
57
using
lib::time::TimeValue
;
58
using
lib::time::FrameRate
;
59
using
lib::time::FSecs
;
60
61
62
class
TimeGrid;
63
using
PGrid =
lib::P<TimeGrid>
;
64
using
GridID =
lib::idi::EntryID<TimeGrid>
;
65
66
77
class
TimeGrid
78
:
public
Meta
79
,
public
virtual
lib::time::Grid
80
{
81
82
public
:
83
/* === shortcut builder functions === */
84
static
PGrid
build
(
FrameRate
frames_per_second);
85
static
PGrid
build
(
Symbol
gridID,
FrameRate
frames_per_second);
86
static
PGrid
build
(
Symbol
gridID,
FrameRate
frames_per_second,
Time
origin);
87
88
protected
:
89
TimeGrid
(
GridID
const
&);
90
};
91
92
93
94
95
96
template
<>
97
struct
Builder
<
TimeGrid
>
98
{
99
string
id
;
100
101
FrameRate
fps;
102
TimeVar
origin;
103
109
lib::P<TimeGrid>
predecessor
;
110
116
Builder
(
string
const
& nameID =
""
)
117
: id {nameID}
118
, fps{1}
119
, origin{
TimeValue
(0)}
120
, predecessor{}
121
{ }
122
126
lib::P<TimeGrid>
commit();
127
128
};
129
130
}}}
// namespace steam::asset::meta
131
#endif
lib::time::TimeVar
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
Definition:
timevalue.hpp:232
steam::asset::meta::TimeGrid
Interface: a grid and scale definition for time quantisation.
Definition:
time-grid.hpp:77
lib::time::FrameRate
Framerate specified as frames per second.
Definition:
timevalue.hpp:655
steam::asset::Meta
key abstraction: metadata, parametrisation, customisation and similar organisational traits...
Definition:
asset/meta.hpp:109
lib::idi::EntryID
typed symbolic and hash ID for asset-like position accounting.
Definition:
entry-id.hpp:126
steam::asset::meta::TimeGrid::build
static PGrid build(FrameRate frames_per_second)
Definition:
time-grid.cpp:158
steam
Steam-Layer implementation namespace root.
Definition:
dummy-player-facade.h:37
lib::time::Time
Lumiera's internal time value datatype.
Definition:
timevalue.hpp:299
steam::asset::meta::TimeGrid::TimeGrid
TimeGrid(GridID const &)
Definition:
time-grid.cpp:48
steam::asset::Asset::id
const ID< Asset > id
Asset primary key.
Definition:
asset.hpp:212
lib::Symbol
Token or Atom with distinct identity.
Definition:
symbol.hpp:117
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:220
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:100
lib::P
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition:
trait.hpp:71
steam::asset::meta::Builder< TimeGrid >::Builder
Builder(string const &nameID="")
initialise to blank (zero).
Definition:
time-grid.hpp:116
lib::time::Grid
Abstraction of a value alignment grid.
Definition:
grid.hpp:58
timevalue.hpp
a family of time value like entities and their relationships.
steam::asset
The asset subsystem of the Steam-Layer.
Definition:
wrapperptr.hpp:35
lib::time::TimeValue
basic constant internal time value.
Definition:
timevalue.hpp:133
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:109
steam
asset
meta
time-grid.hpp
Generated on Fri Dec 13 2024 05:05:36 for Lumiera by
1.8.13