Lumiera  0.pre.03
»edit your freedom«
timeline.cpp
Go to the documentation of this file.
1 /*
2  Timeline - independent top-level element of the Session
3 
4  Copyright (C)
5  2009, 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 
20 #include "steam/asset/timeline.hpp"
22 #include "steam/assetmanager.hpp"
23 
24 
25 namespace steam {
26 namespace asset {
27 
28  using lib::AutoRegistered;
29 
30 
31 
33  Timeline::Timeline (const Asset::Ident& idi, RBinding const& sequenceBinding)
34  : Struct (idi)
35  , boundSequence_(sequenceBinding)
36  {
37  REQUIRE (boundSequence_);
38  }
39 
40 
41  PTimeline
42  Timeline::create (Asset::Ident const& idi, RBinding const& sequenceBinding)
43  {
44  REQUIRE (getRegistry, "can't create a Timeline prior to session initialisation");
45 
46  PTimeline newElement (AssetManager::instance().wrap (*new Timeline(idi, sequenceBinding)));
47  getRegistry().append (newElement);
48 
49  ENSURE (newElement);
50  ENSURE (getRegistry().isRegistered (*newElement));
51  return newElement;
52  }
53 
54 
55  void
57  {
59  boundSequence_.purge();
61  }
62 
63 
64 
65 
66 }} // namespace asset
virtual void unlink()
release all links to other Asset objects held internally.
Definition: asset.cpp:164
virtual void unlink()
release all links to other Asset objects held internally.
Definition: timeline.cpp:56
Steam-Layer Interface: Asset Lookup and Organisation.
An active (smart-ptr like) external reference to a specifically placed MObject "instance" within the ...
Definition: mobject-ref.hpp:85
void purge()
detach this object instance from model, including all child elements.
Steam-Layer implementation namespace root.
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
Helper mixin template for implementing a type intended to participate in automatic element tracking...
static PTarget create()
factory for creating smart-ptr managed TAR instances, automatically registered with the element-track...
a POD comprised of all the information sufficiently identifying any given Asset.
Definition: asset.hpp:149
MObject in session to represent the top-level binding of a sequence.
void detach()
detach this element from the element-tracking registry.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:71
key abstraction: structural asset Created automatically as a sideeffect of building the structure of ...
Definition: struct.hpp:104
Timeline(Ident const &, RBinding const &)
Definition: timeline.cpp:33
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:35
static RegistryLink getRegistry
storage for the functor to link an AutoRegistered entity to the corresponding registration service ...
Top level structural element within the session.