diff --git a/src/gui/interact/wizard.hpp b/src/gui/interact/wizard.hpp index 381f1b40f..31cd7304f 100644 --- a/src/gui/interact/wizard.hpp +++ b/src/gui/interact/wizard.hpp @@ -49,6 +49,12 @@ #include +namespace proc { + namespace asset { + namespace meta { + class ErrorLog; +} } } + namespace gui { namespace ctrl { class GlobalCtx; @@ -62,7 +68,7 @@ namespace interact { // class GlobalCtx; // class SpotLocator; - extern lib::idi::EntryID theErrorLog_ID; + extern lib::idi::EntryID theErrorLog_ID; diff --git a/src/proc/asset/meta/error-log.cpp b/src/proc/asset/meta/error-log.cpp new file mode 100644 index 000000000..6ef173013 --- /dev/null +++ b/src/proc/asset/meta/error-log.cpp @@ -0,0 +1,76 @@ +/* + ErrorLog - Entity to collect and persist incident records + + Copyright (C) Lumiera.org + 2018, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + + +/** @file error-log.cpp + ** Implementation details of incident logging and persistence. + */ + + +#include "proc/asset/meta/error-log.hpp" +//#include "proc/asset/struct-scheme.hpp" +//#include "proc/assetmanager.hpp" +//#include "lib/time/timevalue.hpp" +//#include "lib/format-string.hpp" +//#include "lib/util.hpp" + +//#include + +//using util::_Fmt; +//using util::cStr; +//using util::isnil; +//using std::string; + + +namespace proc { +namespace asset { +namespace meta { + + namespace error = lumiera::error; + + + + /** */ + ErrorLog::ErrorLog (LogID const& nameID) + : Meta{nameID} + { } + + +// using lib::time::Time; +// using lib::time::TimeValue; + + + /** Setup of an ErrorLog: validate the settings within this builder instance, + * then create an appropriately configured ErrorLog instance. + * @return shared_ptr holding onto the new asset::Meta, which has already been + * registered with the AssetManager. + * @todo currently (8/2018) this is a mere placeholder, we just need an EntryID. + */ + lib::P + Builder::commit() + { +// return new ErrorLog; + UNIMPLEMENTED ("how to build and properly register an error log entity"); + } + + +}}} // namespace asset::meta diff --git a/src/proc/asset/meta/error-log.hpp b/src/proc/asset/meta/error-log.hpp new file mode 100644 index 000000000..235db70b8 --- /dev/null +++ b/src/proc/asset/meta/error-log.hpp @@ -0,0 +1,101 @@ +/* + ERROR-LOG.hpp - Entity to collect and persist incident records + + Copyright (C) Lumiera.org + 2018, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +/** @file error-log.hpp + ** An entity to collect, possibly filter and persist incident records. + ** + ** @todo 8/2018 created as mere placeholder; for now we just need an EntryID + ** in order to mark the corresponding receiver widget in the UI. The idea is eventually + ** to persist relevant messages, filtering them out as time passes. Such an incident log + ** would be part of the session model, thus replicating its contents into the corresponding + ** gui::widget::ErrorLogView -- which displays notifications without blocking the UI. + ** + ** @see MetaFactory creating concrete asset::Meta instances + ** @see gui::ctrl::NotificationHub corresponding UI controller + ** @see gui::interact::Wizard information service in the UI + ** + */ + +#ifndef ASSET_META_ERROR_LOG_H +#define ASSET_META_ERROR_LOG_H + +#include "proc/asset/meta.hpp" +#include "lib/idi/entry-id.hpp" +//#include "lib/time/timevalue.hpp" +//#include "lib/symbol.hpp" + + + +namespace proc { +namespace asset { +namespace meta { + +// using lib::Symbol; +// using lib::time::Time; +// using lib::time::TimeVar; +// using lib::time::TimeValue; + + + class ErrorLog; + using PLog = lib::P; + using LogID = lib::idi::EntryID; + + + /** + * Receive, collect, filter and possibly persist incident records. + * @todo 8/2018 mere placeholder type for now, to allow defining an EntyID. + * We conceptually need "the" ErrorLog entity as correspondence to the ErrorLogView in the GUI. + */ + class ErrorLog + : public Meta + { + + public: + + protected: + ErrorLog (LogID const&); + }; + + + + + + template<> + struct Builder + { + + /** + * @todo what is "the default log"?? + */ + Builder() + { } + + /** create a specific error log + * configured as defined through this builder + */ + lib::P commit(); + + }; + +}}} // namespace proc::asset::meta +#endif /*ASSET_META_ERROR_LOG_H*/ diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 60e39ec73..b4a62fd18 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -14325,7 +14325,9 @@ - + + + @@ -32085,14 +32087,153 @@ + - + + + + + + + + +

+ Meta-Assets sind per Definition "immutable"
Es gibt einen Builder +

+ +
+ + + + + + + + + + + + + +

+ das ErrorLog +

+ + +
+ + + + + + + +

+ ....weil hier ein allgemeines Schema entsteht: +

+

+ jede Aktion, die in das UI "reflektiert" wird, erfolgt, indem man eine Nachricht +

+

+ über den UI-Bus schickt, an einen Empfänger mit bekannter ID. +

+ + +
+ +
+
+ + + + + + + + +

+ dort gibt es eine ErrorLogView +

+ + +
+
+ + + + + + +

+ und den Controller: NotificationHub +

+ + +
+ +
+
+ + + +
+ + + + + + + + + +

+ das ist diese Idee, daß eine Struktur sich selbst meta-repräsentiert; +

+

+ dadurch werden Meta-Operationen auf gleiche Ebene gestellt wie normale Struktur-Manipulationen +

+ + +
+ +
+ + + + + + +

+ ...und dadruch würden History-Operationen wie +

+
    +
  • + undo +
  • +
  • + redo +
  • +
  • + repeat command +
  • +
+

+ ...zu ganz normalen Manipulationen der Session, würden ihrerseits geloggt und historisiert +

+

+ und verlieren ihren magischen Charakter außerhalb der Event-Sourcing-Struktur +

+ + +
+
+