Lumiera  0.pre.03
»edit your freedom«
session.cpp
Go to the documentation of this file.
1 /*
2  Session - 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 
28 //#include "common/query/defs-manager.hpp"
29 
30 #include "lib/symbol.hpp"
31 #include "lib/depend.hpp"
32 
33 
34 
35 namespace steam {
36 namespace mobject {
37 
38  using lib::Symbol;
42 
43 
44  namespace { // the global session manager instance...
45  lib::Depend<SessManagerImpl> theSessionManager;
46  }
47 
48 
52  bool Session::initFlag = false;
53 
54 
64  SessManager& Session::current = theSessionManager();
65 
66 
70  template<>
71  SessManagerImpl& SessionImplAPI::current = static_cast<SessManagerImpl&> (Session::current);
72 
73 
74 
75 
87  const char* ON_SESSION_START = "ON_SESSION_START";
88 
95  const char* ON_SESSION_INIT = "ON_SESSION_INIT";
96 
106  const char* ON_SESSION_READY = "ON_SESSION_READY";
107 
115  const char* ON_SESSION_CLOSE ="ON_SESSION_CLOSE";
116 
125  const char* ON_SESSION_END ="ON_SESSION_END";
126 
127 
128 
129 
130  Session::Session (DefaultsAccess defs
131  ,ElementsAccess quer
132  ,TimelineAccess tils
133  ,SequenceAccess seqs) noexcept
134  : defaults(defs)
135  , elements(quer)
136  , timelines(tils)
137  , sequences(seqs)
138  { }
139 
140 
141  // Emit the vtables and other magic stuff here...
142  SessManager::~SessManager() { }
143  Session::~Session () { }
144 
145 
146 
147 }} // namespace steam::mobject
IterQueue< T > elements(T const &elm)
convenience free function to build an iterable sequence
Definition: iter-stack.hpp:292
const char * ON_SESSION_START
LifecycleHook, to perform all the basic setup for a new session, prior to adding any specific data...
Definition: session.cpp:87
static session::SessManager & current
access point to the current Session
Definition: session.hpp:120
Steam-Layer implementation namespace root.
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:280
Token or Atom with distinct identity.
Definition: symbol.hpp:117
Implementation facility for session management.
const char * ON_SESSION_READY
LifecycleHook, to perform post loading tasks, requiring an already completely usable and configured s...
Definition: session.cpp:106
Marker types to indicate a literal string and a Symbol.
Session manager implementation class holding the actual smart pointer to the current Session impl...
creation, access and Session lifecycle Interface.
Definition: session.hpp:152
SessionServices< Types< SessionServiceFetch, SessionServiceMutate, SessionServiceExploreScope, SessionServiceMockIndex, SessionServiceDefaults >, SessManagerImpl, SessionImpl > SessionImplAPI
actual configuration of the session implementation compound: forming an inheritance chain of all inte...
Singleton services and Dependency Injection.
const char * ON_SESSION_INIT
LifecycleHook, to perform any initialisation, wiring and registrations necessary to get the session i...
Definition: session.cpp:95
Session and SessionServices Implementation classes.
static bool initFlag
temporary fix for init problems
Definition: session.hpp:118
const char * ON_SESSION_END
LifecycleHook, to perform any state saving, deregistration or de-activation necessary before bringing...
Definition: session.cpp:125
Primary Interface to the current Session.
const char * ON_SESSION_CLOSE
LifecycleHook, to commence any activity relying on an opened and fully operative session.
Definition: session.cpp:115