Lumiera  0.pre.03
»edit your freedom«
error-log.hpp
Go to the documentation of this file.
1 /*
2  ERROR-LOG.hpp - Entity to collect and persist incident records
3 
4  Copyright (C) Lumiera.org
5  2018, 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 
39 #ifndef ASSET_META_ERROR_LOG_H
40 #define ASSET_META_ERROR_LOG_H
41 
42 #include "steam/asset/meta.hpp"
43 #include "lib/idi/entry-id.hpp"
44 //#include "lib/time/timevalue.hpp"
45 //#include "lib/symbol.hpp"
46 
47 #include <string>
48 
49 
50 
51 namespace steam {
52 namespace asset{
53 namespace meta {
54 
55  using std::string;
56 // using lib::Symbol;
57 // using lib::time::Time;
58 // using lib::time::TimeVar;
59 // using lib::time::TimeValue;
60 
61 
62  class ErrorLog;
63  using PLog = lib::P<ErrorLog>;
64  using LogID = lib::idi::EntryID<ErrorLog>;
65 
66  extern LogID theErrorLog_ID;
67 
68 
74  class ErrorLog
75  : public Meta
76  {
77 
78  public:
82  static PLog global();
83 
84  protected:
85  ErrorLog (LogID const&);
86 
87  friend class Builder<ErrorLog>;
88  };
89 
90 
91 
92 
93 
94  template<>
95  struct Builder<ErrorLog>
96  {
97  string nameID;
101  Builder(string name)
102  : nameID{name}
103  { }
104 
108  lib::P<ErrorLog> commit();
109 
110  };
111 
112 }}} // namespace steam::asset::meta
113 #endif /*ASSET_META_ERROR_LOG_H*/
key abstraction: metadata, parametrisation, customisation and similar organisational traits...
Definition: asset/meta.hpp:118
typed symbolic and hash ID for asset-like position accounting.
Definition: entry-id.hpp:135
Steam-Layer implementation namespace root.
Internal and organisational metadata.
static PLog global()
retrieve (possibly create) the global singleton asset corresponding to "the" global error log...
Definition: error-log.cpp:67
lib::idi::EntryID< ErrorLog > theErrorLog_ID
storage for an unique, globally known ID.
Definition: error-log.cpp:57
Bare symbolic and hash ID used for accounting of asset like entries.
Building and configuring a meta asset.
Definition: asset/meta.hpp:109
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:80
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:44
Receive, collect, filter and possibly persist incident records.
Definition: error-log.hpp:74
ElementBoxWidget::Config::Qualifier name(string id)
define the name-ID displayed in the caption