Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
testasset.cpp
Go to the documentation of this file.
1/*
2 TestClip - test clip (stub) for checking Model/Session functionality
3
4 Copyright (C)
5 2008, 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
21
22using std::static_pointer_cast;
23
24
25namespace steam {
26namespace asset{
27namespace test {
28
29 namespace
30 {
32
38 {
39 return Asset::Ident ( string(_Fmt("TestAsset.%i") % counter)
40 , Category (META)
41 , "test"
42 , counter++
43 );
44 }
47 {
48 return Asset::Ident ( string(_Fmt("%s-TestAsset.%i") % ref->ident.name
49 % counter)
50 , ref->ident.category
51 , "test"
52 , counter++
53 );
54 }
55 }
56
57
58 template<class A>
60 : A(make_new_ident ())
61 { };
62
63
64 template<class A>
66 : A(make_new_ident (pRef))
67 {
68 this->defineDependency(pRef);
69 };
70
71
76 template<class A>
79 {
80 return static_pointer_cast<TestAsset<A>,Asset>
81 (AssetManager::instance().getAsset (this->id));
82 };
83
84
85
86}}} // namespace steam::asset::test
87
88
89
90
91
92 /*********************************************************/
93 /* explicit template instantiations for some Asset Kinds */
94 /*********************************************************/
95
97
98
99namespace steam {
100namespace asset{
101namespace test {
102
103 template TestAsset<Asset>::TestAsset ();
105
106 template TestAsset<Asset>::TestAsset (PAsset& pRef);
107 template TestAsset<Unknown>::TestAsset (PAsset& pRef);
108
111
112
113
114}}} // namespace steam::asset::test
Steam-Layer Interface: Asset Lookup and Organisation.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
Superinterface describing especially bookkeeping properties.
Definition asset.hpp:139
Tree like classification of Assets.
Definition category.hpp:68
A front-end for using printf-style formatting.
unsigned int uint
Definition integral.hpp:29
The asset subsystem of the Steam-Layer.
lib::P< Asset > PAsset
Definition asset.hpp:112
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
a POD comprised of all the information sufficiently identifying any given Asset.
Definition asset.hpp:147
A mock asset to support unit testing.
Marker Asset to indicate an unknown media source.