Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
session.hpp
Go to the documentation of this file.
1/*
2 SESSION.hpp - holds the complete session to be edited by the user
3
4 Copyright (C)
5 2008, 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
41#ifndef MOBJECT_SESSION_H
42#define MOBJECT_SESSION_H
43
47#include "lib/depend.hpp"
48#include "lib/symbol.hpp"
49#include "lib/p.hpp"
50
51#include <memory>
52#include <vector>
53
54
55
56namespace steam {
57namespace asset {
58 class Timeline; typedef lib::P<Timeline> PTimeline;
59 class Sequence; typedef lib::P<Sequence> PSequence;
60}
61namespace fixture {
62 class Fixture;
63 using PFixture = std::shared_ptr<Fixture>;
64}
65
66namespace mobject {
67
68 namespace session {
69 class SessManager;
70 class ElementQuery;
71 }
72
74
75
102 {
103 protected:
106 typedef std::vector<asset::PTimeline> const& TimelineAccess;
107 typedef std::vector<asset::PSequence> const& SequenceAccess;
108
109
113 SequenceAccess) noexcept;
114 virtual ~Session ();
115
116
117 public:
118 static bool initFlag;
119
121
126
127 virtual bool isValid () = 0;
128 virtual MObjectRef attach (PMO const& placement) = 0;
129 virtual bool detach (PMO const& placement) = 0;
130
131 virtual MObjectRef getRoot() = 0;
132
134 virtual void rebuildFixture () = 0;
135
136 };
137
138
139 extern const char* ON_SESSION_START;
140 extern const char* ON_SESSION_INIT;
141 extern const char* ON_SESSION_READY;
142 extern const char* ON_SESSION_CLOSE;
143 extern const char* ON_SESSION_END;
144
145
146 namespace session {
147
154 {
155 public:
157 virtual bool isUp () =0;
158
164 virtual void clear () =0;
165
172 virtual void close () =0;
173
177 virtual void reset () =0;
178
182 virtual void load () =0;
183
189 virtual void save (string snapshotID) =0;
190
195 virtual Session* operator-> () noexcept =0;
196
197 virtual ~SessManager();
198 };
199
200
201 LUMIERA_ERROR_DECLARE (CREATE_SESSION);
202
203
204 } // namespace mobject::session
205
206}} // namespace steam::mobject
207#endif
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
Organise a collection of preconfigured default objects.
The (current) Session holds all the user visible content to be edited and manipulated within the Lumi...
Definition session.hpp:102
TimelineAccess timelines
collection of timelines (top level)
Definition session.hpp:124
DefaultsAccess defaults
manages default configured objects
Definition session.hpp:122
static bool initFlag
temporary fix for init problems
Definition session.hpp:118
virtual bool isValid()=0
virtual bool detach(PMO const &placement)=0
SequenceAccess sequences
collection of sequences
Definition session.hpp:125
virtual void rebuildFixture()=0
static session::SessManager & current
access point to the current Session
Definition session.hpp:120
session::ElementQuery & ElementsAccess
Definition session.hpp:105
ElementsAccess elements
Definition session.hpp:123
virtual MObjectRef attach(PMO const &placement)=0
std::vector< asset::PTimeline > const & TimelineAccess
Definition session.hpp:106
lumiera::query::DefsManager & DefaultsAccess
Definition session.hpp:104
std::vector< asset::PSequence > const & SequenceAccess
Definition session.hpp:107
virtual MObjectRef getRoot()=0
virtual fixture::PFixture & getFixture()=0
Access point to session global search and query functions.
creation, access and Session lifecycle Interface.
Definition session.hpp:154
virtual bool isUp()=0
diagnostics: session interface opened?
virtual void load()=0
replace the current session by a new session loaded from serialised state.
virtual void reset()=0
reset all session config and start with a pristine default session.
virtual void clear()=0
clear current session contents without resetting overall session config.
virtual Session * operator->() noexcept=0
access to the current session object instance.
virtual void save(string snapshotID)=0
create a complete, serialised representation of the current session config and contents.
virtual void close()=0
shut down the current session cleanly.
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
Management of defaults and default rules.
Singleton services and Dependency Injection.
#define LUMIERA_ERROR_DECLARE(err)
Forward declare an error constant.
Definition error.h:62
External MObject/Placement reference.
The asset subsystem of the Steam-Layer.
lib::P< Sequence > PSequence
Definition sequence.hpp:76
lib::P< Timeline > PTimeline
Definition timeline.hpp:82
shared_ptr< Fixture > PFixture
Definition fixture.hpp:91
Namespace of Session and user visible high-level objects.
Definition sequence.hpp:65
MORef< MObject > MObjectRef
const char * ON_SESSION_END
triggered before discarding an existing session
Definition session.cpp:125
const char * ON_SESSION_READY
triggered after session is completely functional and all APIs are open.
Definition session.cpp:106
const char * ON_SESSION_CLOSE
triggered before initiating the session shutdown sequence
Definition session.cpp:115
const char * ON_SESSION_INIT
triggered when initialising a new session, after adding content
Definition session.cpp:95
const char * ON_SESSION_START
triggered before loading any content into a newly created session
Definition session.cpp:87
session::SessManager & PSess
acts as a "PImpl" smart ptr
Definition session.hpp:73
Steam-Layer implementation namespace root.
Customised refcounting smart pointer.
Core abstraction: placement of a media object into session context.
Marker types to indicate a literal string and a Symbol.