Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
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
40namespace steam {
41 struct StreamType;
42
43namespace mobject {
44namespace session {
45
46 class Fork;
47 class Clip;
48
49}}
50
51namespace 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>
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>
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
150 {
152 return Asset::Ident (entryID.getSym(), cat);
153 }
154
155
156
157}}} // namespace asset::idi
158#endif
Steam-Layer Interface: Assets.
Token or Atom with distinct identity.
Definition symbol.hpp:120
string const & getSym() const
Definition entry-id.hpp:169
Tree like classification of Assets.
Definition category.hpp:68
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
Definition pipe.hpp:72
"Processing Pattern" is a structural Asset representing information how to build some part of the ren...
Definition procpatt.hpp:54
TODO type comment.
Definition sequence.hpp:86
Interface: a grid and scale definition for time quantisation.
Definition time-grid.hpp:80
A user visible/editable Clip is a reference to a contiguous sequence of media data loaded as Asset in...
A Fork serves as grouping device within the Session.
Definition fork.hpp:95
Bare symbolic and hash ID used for accounting of asset like entries.
Front-end for printf-style string template interpolation.
Simple and lightweight helpers for metaprogramming and type detection.
enable_if_c< Cond::value, T >::type enable_if
SFINAE helper to control the visibility of specialisations and overloads.
Definition meta/util.hpp:87
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.
The asset subsystem of the Steam-Layer.
Kind
top-level distinction of different Kinds of Assets.
Definition category.hpp:48
Namespace of Session and user visible high-level objects.
Definition sequence.hpp:65
Steam-Layer implementation namespace root.
typed symbolic and hash ID for asset-like position accounting.
Definition entry-id.hpp:219
a POD comprised of all the information sufficiently identifying any given Asset.
Definition asset.hpp:147
static Symbol idSymbol()
used as type predicate symbol
Marker types to indicate a literal string and a Symbol.