Lumiera  0.pre.03
»edit your freedom«
state-manager.hpp
Go to the documentation of this file.
1 /*
2  STATE-MANAGER.hpp - maintaining persistent interface state
3 
4  Copyright (C) Lumiera.org
5  2016, 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 
52 #ifndef STAGE_CTRL_STATE_MANAGER_H
53 #define STAGE_CTRL_STATE_MANAGER_H
54 
55 
56 #include "lib/idi/entry-id.hpp"
57 #include "lib/diff/gen-node.hpp"
58 #include "lib/nocopy.hpp"
59 
60 #include <string>
61 
62 
63 namespace stage {
64 namespace ctrl {
65 
66  using std::string;
67 
68 
81  {
82  protected:
83  virtual ~StateManager();
84 
85  using ID = lib::idi::BareEntryID const&;
86  using StateMark = lib::diff::GenNode const&;
87  public:
88 
89  virtual StateMark
90  currentState (ID uiElm, string propertyKey) const =0;
91 
92  virtual void
93  replayState (ID uiElm, string propertyKey) =0;
94 
95  virtual void
96  replayAllState() =0;
97 
98  virtual void
99  replayAllState (string propertyKey) =0;
100 
101  virtual void
102  replayAllProperties (ID uiElm) =0;
103 
104  virtual void
105  clearState() =0;
106 
107  private:
108  };
109 
110 
111 
112 }} // namespace stage::ctrl
113 #endif /*STAGE_CTRL_STATE_MANAGER_H*/
type erased baseclass for building a combined hash and symbolic ID.
Definition: entry-id.hpp:142
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
virtual ~StateManager()
this is an interface
Definition: ui-state.cpp:47
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
Generic building block for tree shaped (meta)data structures.
Interface: handling of persistent interface state.
Bare symbolic and hash ID used for accounting of asset like entries.
generic data element node within a tree
Definition: gen-node.hpp:231