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) Lumiera.org
5  2010, 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 
70 #ifndef STEAM_MOBJECT_SESSION_INTERFACE_MODULES_H
71 #define STEAM_MOBJECT_SESSION_INTERFACE_MODULES_H
72 
73 #include "lib/element-tracker.hpp"
74 #include "steam/asset/timeline.hpp"
75 #include "steam/asset/sequence.hpp"
78 
79 
80 
81 
82 namespace steam {
83 namespace mobject {
84 namespace session {
85 
86 
87  typedef lib::ElementTracker<asset::Timeline> TimelineTracker;
88  typedef lib::ElementTracker<asset::Sequence> SequenceTracker;
89 
90 
98  {
99  lumiera::query::DefsManager defaultsManager_;
100  mobject::session::ElementQuery elementQueryAPI_;
101  TimelineTracker timelineRegistry_;
102  SequenceTracker sequenceRegistry_;
103 
106  };
107 
108 
109 
110 
114  inline
116  {
117  asset::Timeline::setRegistryInstance (timelineRegistry_);
118  asset::Sequence::setRegistryInstance (sequenceRegistry_);
119  }
120 
121  inline
122  SessionInterfaceModules::~SessionInterfaceModules()
123  {
124  if (asset::Sequence::is_attached_to (sequenceRegistry_))
125  asset::Sequence::deactivateRegistryLink();
126 
127  if (asset::Timeline::is_attached_to (timelineRegistry_)) // as session dtor is invoked automatically (smart-ptr),
128  asset::Timeline::deactivateRegistryLink(); // another new session might already have grabbed
129  } // the Timeline / Sequence registration service.
130 
131 
132 
133 }}} // namespace steam::mobject::session
134 #endif
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:74
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.