From 7ea4f739bdec6377603bda79c00898a770683a9a Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 27 Jun 2015 19:33:49 +0200 Subject: [PATCH] introduce a new header for #984 --- src/lib/idi/genfunc.hpp | 71 +++++++++++++++++++++++++++++++++++++ src/proc/asset/entry-id.hpp | 7 ++++ wiki/thinkPad.ichthyo.mm | 17 +++++---- 3 files changed, 89 insertions(+), 6 deletions(-) create mode 100644 src/lib/idi/genfunc.hpp diff --git a/src/lib/idi/genfunc.hpp b/src/lib/idi/genfunc.hpp new file mode 100644 index 000000000..d88c4b306 --- /dev/null +++ b/src/lib/idi/genfunc.hpp @@ -0,0 +1,71 @@ +/* + GENFUNC.hpp - generic identification functions + + Copyright (C) Lumiera.org + 2015, 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 genfunc.hpp + ** Generic function to build identification schemes. + ** These template functions are meant as common extension point. + ** The purpose is to streamline and disentangle the various identification schemes + ** in use at various places within Lumiera. We strive to cover all the common basic + ** usage situations through these functions + ** - build a symbolic ID + ** - build a classification record + ** - create a readable yet unique ID + ** - render an ID in human readable form + ** - derive a hash function + ** + ** @see EntryID + ** + */ + + + +#ifndef LIB_IDI_GENFUNC_H +#define LIB_IDI_GENFUNC_H + +#include "lib/hash-value.h" +//#include "lib/hash-standard.hpp" + +#include + + +namespace lib { +namespace idi { + + namespace { // integration helpers... + } //(End)integration helpers... + + + + /********************************************************//** + * A Mixin to add a private ID type to the target class, + * together with storage to hold an instance of this ID, + * getter and setter, and a templated version of the ID type + * which can be used to pass specific subclass type info. + */ + + + + + +}} // namespace lib::idi +#endif /*LIB_IDI_GENFUNC_H*/ diff --git a/src/proc/asset/entry-id.hpp b/src/proc/asset/entry-id.hpp index cef31a098..a352a8d4e 100644 --- a/src/proc/asset/entry-id.hpp +++ b/src/proc/asset/entry-id.hpp @@ -62,6 +62,13 @@ namespace asset { + /** + * Identification Schemes. + * Collection of commonly used mechanisms to build identification records, + * unique identifiers, registration numbers and hashes. These are used as glue + * and thin abstraction to link various subsystems or to allow interoperation + * of registration facilities + */ namespace idi { using lib::hash::LuidH; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index c31af429b..d3566b380 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -31,6 +31,14 @@ + + + + + + + + @@ -50,8 +58,7 @@ von literalen Daten

- - +
@@ -74,8 +81,7 @@ scheidet aus, wegen Wertsemantik

- - +
@@ -144,8 +150,7 @@ m.E. die einzig saubere Desgin-Variante!

- - +