Lumiera  0.pre.03
»edit your freedom«
sess-manager-impl.hpp
Go to the documentation of this file.
1 /*
2  SESS-MANAGER-IMPL.hpp - global session access and lifecycle
3 
4  Copyright (C)
5  2009, 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 
31 #ifndef MOBJECT_SESSION_SESS_MANAGER_IMPL_H
32 #define MOBJECT_SESSION_SESS_MANAGER_IMPL_H
33 
35 #include "lib/sync.hpp"
36 
37 
38 namespace steam {
39 namespace mobject {
40 namespace session {
41 
42  using lib::Sync;
43  using lib::RecursiveLock_NoWait;
44 
45  class LifecycleAdvisor;
46 
47 
53  : public SessManager
54  , public Sync<RecursiveLock_NoWait>
55  {
56  unique_ptr<SessionImplAPI> pSess_;
57  unique_ptr<LifecycleAdvisor> lifecycle_;
58 
60  friend class lib::DependencyFactory<SessManagerImpl>;
61 
62  ~SessManagerImpl() ;
63 
64  /* ==== SessManager API ==== */
65  virtual void clear() override;
66  virtual void close() override;
67  virtual void reset() override;
68  virtual void load () override;
69  virtual void save (string) override;
70 
71  virtual bool isUp () override;
72 
73 
74  public:
75  /* ==== steam layer internal API ==== */
76 
77  virtual SessionImplAPI* operator-> () noexcept override;
78 
79  };
80 
81 
82 
83 }}} // namespace steam::mobject::session
84 #endif
Facility for monitor object based locking.
Definition: sync.hpp:209
Collection of configured implementation-level services to provide by the Session. ...
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:65
Object Monitor based synchronisation.
SessManagerImpl()
Starting up the session access and lifecycle management.
Session manager implementation class holding the actual smart pointer to the current Session impl...
creation, access and Session lifecycle Interface.
Definition: session.hpp:152
virtual SessionImplAPI * operator->() noexcept override
Access to the "current session", which actually is an SessionImpl instance.
Helper to abstract creation and lifecycle of a dependency.
Definition: depend.hpp:125
Session and SessionServices Implementation classes.
virtual bool isUp() override
diagnostics: session interface opened?
virtual void close() override
Shut down the current session together with all associated services.