Lumiera  0.pre.03
»edit your freedom«
unknown.hpp
Go to the documentation of this file.
1 /*
2  UNKNOWN.hpp - placeholder for unknown or unavailable media source
3 
4  Copyright (C) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
32 #ifndef ASSET_UNKNOWN_H
33 #define ASSET_UNKNOWN_H
34 
35 #include "steam/asset/media.hpp"
36 #include "lib/time/timevalue.hpp"
37 
38 
39 
40 namespace steam {
41 namespace asset {
42 
43  using lib::time::FSecs;
44  using lib::time::Duration;
45 
46  const Duration DUMMY_TIME (FSecs(5));
47 
54  class Unknown : public Media
55  {
56  protected:
57  Unknown (const Asset::Ident& idi, string name="", Duration length=DUMMY_TIME);
58  friend class MediaFactory;
59 
60  public:
61  virtual Media::PMedia getOrg();
62 
63  };
64 
65  LUMIERA_ERROR_DECLARE (ORIG_NOT_FOUND);
66 
67 
68 
69 
70 }} // namespace steam::asset
71 #endif
Unknown(const Asset::Ident &idi, string name="", Duration length=DUMMY_TIME)
create a placeholder for a media with the given identity.
Definition: unknown.cpp:46
key abstraction: media-like assets
Definition: media.hpp:72
Media data represented a specific kind of Asset.
#define LUMIERA_ERROR_DECLARE(err)
Forward declare an error constant.
Definition: error.h:71
Steam-Layer implementation namespace root.
Factory specialised for creating Media Asset objects.
Definition: media.hpp:143
a POD comprised of all the information sufficiently identifying any given Asset.
Definition: asset.hpp:158
virtual Media::PMedia getOrg()
using the information stored in this placeholder asset, try to access the "real" media it stands for...
Definition: unknown.cpp:57
Placeholder Asset for unknown or unavailable media source.
Definition: unknown.hpp:54
boost::rational< int64_t > FSecs
rational representation of fractional seconds
Definition: timevalue.hpp:229
const Duration DUMMY_TIME(FSecs(5))
Duration is the internal Lumiera time metric.
Definition: timevalue.hpp:477
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:80
a family of time value like entities and their relationships.
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:44
ElementBoxWidget::Config::Qualifier name(string id)
define the name-ID displayed in the caption