Lumiera  0.pre.03
»edit your freedom«
session-interface-modules.hpp
Go to the documentation of this file.
1 /*
2  SESSION-INTERFACE-MODULES.hpp - composing the public session API from several interface modules
3 
4  Copyright (C)
5  2010, 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 
61 #ifndef STEAM_MOBJECT_SESSION_INTERFACE_MODULES_H
62 #define STEAM_MOBJECT_SESSION_INTERFACE_MODULES_H
63 
64 #include "lib/element-tracker.hpp"
65 #include "steam/asset/timeline.hpp"
66 #include "steam/asset/sequence.hpp"
69 
70 
71 
72 
73 namespace steam {
74 namespace mobject {
75 namespace session {
76 
77 
78  typedef lib::ElementTracker<asset::Timeline> TimelineTracker;
79  typedef lib::ElementTracker<asset::Sequence> SequenceTracker;
80 
81 
89  {
90  lumiera::query::DefsManager defaultsManager_;
91  mobject::session::ElementQuery elementQueryAPI_;
92  TimelineTracker timelineRegistry_;
93  SequenceTracker sequenceRegistry_;
94 
97  };
98 
99 
100 
101 
105  inline
107  {
108  asset::Timeline::setRegistryInstance (timelineRegistry_);
109  asset::Sequence::setRegistryInstance (sequenceRegistry_);
110  }
111 
112  inline
113  SessionInterfaceModules::~SessionInterfaceModules()
114  {
115  if (asset::Sequence::is_attached_to (sequenceRegistry_))
116  asset::Sequence::deactivateRegistryLink();
117 
118  if (asset::Timeline::is_attached_to (timelineRegistry_)) // as session dtor is invoked automatically (smart-ptr),
119  asset::Timeline::deactivateRegistryLink(); // another new session might already have grabbed
120  } // the Timeline / Sequence registration service.
121 
122 
123 
124 }}} // namespace steam::mobject::session
125 #endif
Any copy and copy construction prohibited.
Definition: nocopy.hpp:37
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:65
Management of defaults and default rules.
Structural building block of the session: a sequence of clips.
Organise a collection of preconfigured default objects.
Collection of implementation components, providing self-contained sub-elements exposed on the public ...
Search and query services to discover contents of the session.
Tracking instances automatically on creation and disposal.
SessionInterfaceModules()
init element-tracking mechanism for timelines and sequences on session creation
Access point to session global search and query functions.
Top level structural element within the session.