Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
error-log.cpp
Go to the documentation of this file.
1/*
2 ErrorLog - Entity to collect and persist incident records
3
4 Copyright (C)
5 2018, 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
23//#include "lib/time/timevalue.hpp"
24//#include "lib/format-string.hpp"
25//#include "lib/util.hpp"
26
27//#include <string>
28
29//using util::_Fmt;
30//using util::cStr;
31//using util::isnil;
32//using std::string;
33using std::dynamic_pointer_cast;
34
35
36namespace steam {
37namespace asset{
38namespace meta {
39
40 namespace error = lumiera::error;
41
42
48 LogID theErrorLog_ID{"global_ErrorLog"};
49
50
52 ErrorLog::ErrorLog (LogID const& nameID)
53 : Meta{nameID}
54 { }
55
56
57 PLog
59 {
61 ID<Asset> globalLogID = AssetManager::instance().getID(ident);
63
64 if (not AssetManager::instance().known (globalLogID))
66 .commit();
67 else
68 return dynamic_pointer_cast<ErrorLog> (AssetManager::instance().getAsset (globalLogID));
69 }
70
71// using lib::time::Time;
72// using lib::time::TimeValue;
73
74
83 {
84 ASSERT (nameID == theErrorLog_ID.getSym(), "only the single global Error Log is implemented for now");
86 }
87
88
89}}} // namespace asset::meta
Steam-Layer Interface: Asset Lookup and Organisation.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
static lib::P< KIND > wrap(const KIND &asset)
retrieve the registered smart-ptr for any asset
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
const Ident ident
Asset identification tuple.
Definition asset.hpp:197
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
Definition asset.hpp:98
key abstraction: metadata, parametrisation, customisation and similar organisational traits.
static MetaFactory create
storage for the static MetaFactory instance
Receive, collect, filter and possibly persist incident records.
Definition error-log.hpp:67
static PLog global()
retrieve (possibly create) the global singleton asset corresponding to "the" global error log,...
Definition error-log.cpp:58
An entity to collect, possibly filter and persist incident records.
Asset::Ident getAssetIdent(lib::idi::EntryID< TY > const &entryID, asset::Kind assetKind=STRUCT)
generate an Asset identification tuple based on this EntryID's symbolic ID and type information.
lib::idi::EntryID< ErrorLog > theErrorLog_ID
storage for an unique, globally known ID.
Definition error-log.cpp:48
Building and configuring a meta asset.
The asset subsystem of the Steam-Layer.
Steam-Layer implementation namespace root.
Naming and labelling scheme for structural assets.
typed symbolic and hash ID for asset-like position accounting.
Definition entry-id.hpp:219
a POD comprised of all the information sufficiently identifying any given Asset.
Definition asset.hpp:147