Lumiera  0.pre.03
»edit your freedom«
sequence.cpp
Go to the documentation of this file.
1 /*
2  Sequence - Compound of MObjects placed within a tree of tracks. Building block of the Session
3 
4  Copyright (C) Lumiera.org
5  2009, 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 
29 #include "steam/asset/sequence.hpp"
30 //#include "steam/mobject/session/fork.hpp"
31 #include "steam/assetmanager.hpp"
32 //#include "steam/mobject/placement.hpp"
33 //#include "steam/mobject/session/mobjectfactory.hpp"
34 
35 namespace steam {
36 namespace asset {
37 
38  using lib::AutoRegistered;
39 
40 
43  : Struct (idi)
44  { }
45 
46 
47  PSequence
49  {
50  REQUIRE (getRegistry, "can't create a Sequence prior to session initialisation");
51 
52  PSequence newSeq (AssetManager::instance().wrap (*new Sequence (idi)));
53  getRegistry().append (newSeq);
54 
55  ENSURE (newSeq);
56  ENSURE (getRegistry().isRegistered (*newSeq));
57  return newSeq;
58  }
59 
60 
61  void
63  {
65  TODO ("purge attached fork");
67  }
68 
69 
70 
71 }} // namespace asset
virtual void unlink()
release all links to other Asset objects held internally.
Definition: asset.cpp:173
Steam-Layer Interface: Asset Lookup and Organisation.
TODO type comment.
Definition: sequence.hpp:92
Sequence(Ident const &)
create an empty default configured Sequence
Definition: sequence.cpp:42
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...
Structural building block of the session: a sequence of clips.
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:158
void detach()
detach this element from the element-tracking registry.
virtual void unlink()
release all links to other Asset objects held internally.
Definition: sequence.cpp:62
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:80
key abstraction: structural asset Created automatically as a sideeffect of building the structure of ...
Definition: struct.hpp:113
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:44
static RegistryLink getRegistry
storage for the functor to link an AutoRegistered entity to the corresponding registration service ...