Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
lifecycle-advisor.hpp
Go to the documentation of this file.
1/*
2 LIFECYCLE-ADVISOR.hpp - outline of the session lifecycle
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
40#ifndef STEAM_MOBJECT_SESSION_LIFECYCLE_ADVISOR_H
41#define STEAM_MOBJECT_SESSION_LIFECYCLE_ADVISOR_H
42
43#include "lib/error.hpp"
44#include "lib/nocopy.hpp"
45#include "include/lifecycle.h"
47#include "lib/symbol.hpp"
48
49
50namespace steam {
51namespace mobject {
52namespace session {
53
54 using lib::Symbol;
55
56
66 {
67
68
69 public:
79 void
81 {
82 createSessionFacilities(); // includes switch of the "current" Session
89 }
90
91
102 void
112
113
114 virtual ~LifecycleAdvisor() { }
115
116
117 protected: /* === Lifecycle building blocks === */
118
119 void
120 emitEvent (Symbol eventLabel)
121 {
123 }
124
125
133 virtual void createSessionFacilities() =0;
134
135
139 virtual void injectSessionContent() =0;
140
141
145 virtual void getSessionReady() =0;
146
147
151 virtual void openSessionInterface() =0;
152
153
157 virtual void closeSessionInterface() =0;
158
159
163 virtual void disconnectRenderProcesses() =0;
164
165
169 virtual void commandLogCheckpoint() =0;
170
171
184 virtual void deconfigure() =0;
185 };
186
187
188
189}}} // namespace mobject::session
190#endif
Token or Atom with distinct identity.
Definition symbol.hpp:120
static void trigger(Symbol eventLabel)
trigger lifecycle callbacks registered under the given label
Definition lifecycle.cpp:72
Skeleton of operations conducting the session lifecycle sequences.
void shutDown()
operation sequence for cleanly shutting down the session.
virtual void deconfigure()=0
This final stage of the session lifecycle terminates the operational state of all parts of the curren...
virtual void createSessionFacilities()=0
Build and wire all the sub components together forming the session implementation.
void pullUp()
operation sequence to pull up the session.
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
Lumiera error handling (C++ interface).
Installing and invoking of application lifecycle event callbacks.
Namespace of Session and user visible high-level objects.
Definition sequence.hpp:65
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
Steam-Layer implementation namespace root.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Primary Interface to the current Session.
Marker types to indicate a literal string and a Symbol.