Lumiera
0.pre.03
»edit your freedom«
struct-scheme.hpp
Go to the documentation of this file.
1
/*
2
STRUCT-SCHEME.hpp - naming and designation scheme for structural assets
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
26
#ifndef ASSET_STRUCT_SCHEME_H
27
#define ASSET_STRUCT_SCHEME_H
28
29
30
#include "
lib/symbol.hpp
"
31
#include "
steam/asset.hpp
"
32
#include "
lib/idi/entry-id.hpp
"
33
#include "
lib/meta/util.hpp
"
34
#include "
lib/format-string.hpp
"
35
36
#include <cstdlib>
37
38
39
40
namespace
steam
{
41
struct
StreamType;
42
43
namespace
mobject {
44
namespace
session
{
45
46
class
Fork;
47
class
Clip;
48
49
}}
50
51
namespace
asset
{
52
53
class
Pipe;
54
class
ProcPatt;
55
class
Timeline;
56
class
Sequence;
57
58
namespace
meta {
59
class
TimeGrid;
60
}
61
62
63
namespace
idi {
64
65
using
lib::Symbol
;
66
67
68
69
/* ==== structural asset ID scheme ==== */
70
71
template
<
class
STRU>
72
struct
StructTraits
73
{
74
static
Symbol
namePrefix();
75
static
Symbol
catFolder();
76
static
Symbol
idSymbol();
77
};
78
79
80
template
<>
struct
StructTraits
<mobject::
session::Fork
>
81
{
82
static
Symbol
namePrefix() {
return
"fork"
; }
83
static
Symbol
catFolder() {
return
"forks"
;}
84
static
Symbol
idSymbol() {
return
"fork"
; }
85
};
86
template
<>
struct
StructTraits
<mobject::
session::Clip
>
87
{
88
static
Symbol
namePrefix() {
return
"clip"
; }
89
static
Symbol
catFolder() {
return
"clips"
;}
90
static
Symbol
idSymbol() {
return
"clip"
; }
91
};
92
template
<>
struct
StructTraits
<
Pipe
>
93
{
94
static
Symbol
namePrefix() {
return
"pipe"
; }
95
static
Symbol
catFolder() {
return
"pipes"
;}
96
static
Symbol
idSymbol() {
return
"pipe"
; }
97
};
98
template
<>
struct
StructTraits
<
steam
::
StreamType
>
99
{
100
static
Symbol
namePrefix() {
return
"type"
; }
101
static
Symbol
catFolder() {
return
"stream-types"
;}
102
static
Symbol
idSymbol() {
return
"stype"
; }
103
};
104
template
<>
struct
StructTraits
<const
ProcPatt
>
105
{
106
static
Symbol
namePrefix() {
return
"patt"
; }
107
static
Symbol
catFolder() {
return
"build-templates"
;}
108
static
Symbol
idSymbol() {
return
"procPatt"
; }
109
};
110
template
<>
struct
StructTraits
<
Timeline
>
111
{
112
static
Symbol
namePrefix() {
return
"tL"
; }
113
static
Symbol
catFolder() {
return
"timelines"
;}
114
static
Symbol
idSymbol() {
return
"timeline"
; }
115
};
116
template
<>
struct
StructTraits
<
Sequence
>
117
{
118
static
Symbol
namePrefix() {
return
"seq"
; }
119
static
Symbol
catFolder() {
return
"sequences"
;}
120
static
Symbol
idSymbol() {
return
"sequence"
; }
121
};
122
template
<>
struct
StructTraits
<meta::
TimeGrid
>
123
{
124
static
Symbol
namePrefix() {
return
"grid"
; }
125
static
Symbol
catFolder() {
return
"time-scales"
;}
126
static
Symbol
idSymbol() {
return
"timeGrid"
; }
127
};
128
129
130
/* catch-all defaults */
131
template
<
class
X>
132
Symbol
StructTraits<X>::idSymbol
() {
return
lib::meta::typeSymbol<X>(); }
133
template
<
class
X>
134
Symbol
StructTraits<X>::catFolder
(){
return
idSymbol(); }
135
template
<
class
X>
136
Symbol
StructTraits<X>::namePrefix
(){
return
idSymbol(); }
137
138
139
147
template
<
typename
TY>
148
inline
Asset::Ident
149
getAssetIdent
(
lib::idi::EntryID<TY>
const
& entryID,
asset::Kind
assetKind =STRUCT)
150
{
151
Category
cat (assetKind,
idi::StructTraits<TY>::catFolder
());
152
return
Asset::Ident
(entryID.getSym(), cat);
153
}
154
155
156
157
}}}
// namespace asset::idi
158
#endif
steam::asset::Timeline
Definition:
timeline.hpp:91
steam::asset::meta::TimeGrid
Interface: a grid and scale definition for time quantisation.
Definition:
time-grid.hpp:77
steam::asset::idi::StructTraits
Definition:
struct-scheme.hpp:72
steam::asset::ProcPatt
"Processing Pattern" is a structural Asset representing information how to build some part of the ren...
Definition:
procpatt.hpp:52
steam::asset::Sequence
TODO type comment.
Definition:
sequence.hpp:83
steam::asset::Category
Tree like classification of Assets.
Definition:
category.hpp:66
util.hpp
Simple and lightweight helpers for metaprogramming and type detection.
format-string.hpp
Front-end for printf-style string template interpolation.
lib::idi::EntryID
typed symbolic and hash ID for asset-like position accounting.
Definition:
entry-id.hpp:126
steam::mobject::session::Clip
A user visible/editable Clip is a reference to a contiguous sequence of media data loaded as Asset in...
Definition:
mobject/session/clip.hpp:62
steam
Steam-Layer implementation namespace root.
Definition:
dummy-player-facade.h:37
steam::mobject::session
Namespace of Session and user visible high-level objects.
Definition:
sequence.hpp:65
steam::asset::Pipe
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
Definition:
pipe.hpp:70
steam::StreamType
Definition:
streamtype.hpp:45
lib::Symbol
Token or Atom with distinct identity.
Definition:
symbol.hpp:117
steam::asset::Asset::Ident
a POD comprised of all the information sufficiently identifying any given Asset.
Definition:
asset.hpp:149
symbol.hpp
Marker types to indicate a literal string and a Symbol.
asset.hpp
Steam-Layer Interface: Assets.
steam::asset::Kind
Kind
top-level distinction of different Kinds of Assets.
Definition:
category.hpp:46
steam::mobject::session::Fork
A Fork serves as grouping device within the Session.
Definition:
fork.hpp:94
entry-id.hpp
Bare symbolic and hash ID used for accounting of asset like entries.
steam::asset
The asset subsystem of the Steam-Layer.
Definition:
wrapperptr.hpp:35
steam::asset::idi::getAssetIdent
Asset::Ident getAssetIdent(lib::idi::EntryID< TY > const &entryID, asset::Kind assetKind=STRUCT)
generate an Asset identification tuple based on this EntryID's symbolic ID and type information...
Definition:
struct-scheme.hpp:149
steam
asset
struct-scheme.hpp
Generated on Fri Dec 13 2024 05:05:35 for Lumiera by
1.8.13