Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
unknown.cpp
Go to the documentation of this file.
1/*
2 Unknown - placeholder for unknown or unavailable media source
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
14
21#include "lib/format-string.hpp"
22
23using util::_Fmt;
24
25namespace steam {
26namespace asset {
27
28 LUMIERA_ERROR_DEFINE (ORIG_NOT_FOUND, "Media referred by placeholder not found");
29
30
31
37 Unknown::Unknown (const Asset::Ident& idi, string name, Duration length)
38 : Media (idi, name, length)
39 {
40 TODO ("implement some sensible behaviour for the »unknown media« placeholder...");
41 }
42
43
49 {
50 UNIMPLEMENTED ("how to get at the original media from a »Unknown« placeholder");
51 if (1==0)
52 throw lumiera::error::Invalid (_Fmt("Unable to locate original media "
53 "for ID=%s, filename=\"%s\".")
54 % this->ident
55 % this->getFilename()
56 ,LUMIERA_ERROR_ORIG_NOT_FOUND);
57 }
58
59
60
61}} // namespace asset
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
Duration is the internal Lumiera time metric.
const Ident ident
Asset identification tuple.
Definition asset.hpp:197
key abstraction: media-like assets
Definition media.hpp:64
const string & getFilename() const
Definition media.hpp:76
Unknown(const Asset::Ident &idi, string name="", Duration length=DUMMY_TIME)
create a placeholder for a media with the given identity.
Definition unknown.cpp:37
virtual Media::PMedia getOrg()
using the information stored in this placeholder asset, try to access the "real" media it stands for.
Definition unknown.cpp:48
A front-end for using printf-style formatting.
#define LUMIERA_ERROR_DEFINE(err, msg)
Definition and initialisation of an error constant.
Definition error.h:71
Front-end for printf-style string template interpolation.
LumieraError< LERR_(INVALID)> Invalid
Definition error.hpp:211
The asset subsystem of the Steam-Layer.
Steam-Layer implementation namespace root.
a POD comprised of all the information sufficiently identifying any given Asset.
Definition asset.hpp:147
Marker Asset to indicate an unknown media source.