introduce a new header for #984

This commit is contained in:
Fischlurch 2015-06-27 19:33:49 +02:00
parent de08a4d3c6
commit 7ea4f739bd
3 changed files with 89 additions and 6 deletions

71
src/lib/idi/genfunc.hpp Normal file
View file

@ -0,0 +1,71 @@
/*
GENFUNC.hpp - generic identification functions
Copyright (C) Lumiera.org
2015, Hermann Vosseler <Ichthyostega@web.de>
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 <string>
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*/

View file

@ -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;

View file

@ -31,6 +31,14 @@
<node CREATED="1434128239517" ID="ID_1886740948" MODIFIED="1434128250041" TEXT="Mapping"/>
<node CREATED="1434128170381" ID="ID_976705384" MODIFIED="1434128380059" TEXT="GenNode">
<linktarget COLOR="#ff0033" DESTINATION="ID_976705384" ENDARROW="Default" ENDINCLINATION="2;9;" ID="Arrow_ID_1285375088" SOURCE="ID_553361956" STARTARROW="Default" STARTINCLINATION="26;-13;"/>
<node CREATED="1435421658394" ID="ID_1938259420" MODIFIED="1435421666963" TEXT="ID">
<node CREATED="1435421670349" ID="ID_1358247529" MODIFIED="1435421676200" TEXT="verwende EntryID">
<node CREATED="1435421678004" ID="ID_691179282" MODIFIED="1435421687224" TEXT="Abh&#xe4;ngigkeitsprobleme">
<node CREATED="1435421693260" ID="ID_1314021887" MODIFIED="1435421708857" TEXT="generische ID-Funktionen"/>
<node CREATED="1435421739988" ID="ID_405602814" MODIFIED="1435421749352" TEXT="EntryID geh&#xf6;rt in Library"/>
</node>
</node>
</node>
<node CREATED="1434128174030" ID="ID_1395250463" MODIFIED="1434128176521" TEXT="Variant"/>
<node CREATED="1434128217645" ID="ID_1790054544" MODIFIED="1434128220257" TEXT="Monade"/>
<node CREATED="1434128176918" ID="ID_863330674" MODIFIED="1434128195333" TEXT="Record">
@ -50,8 +58,7 @@
von literalen Daten
</p>
</body>
</html>
</richcontent>
</html></richcontent>
</node>
</node>
<node CREATED="1434128179406" ID="ID_1833179523" MODIFIED="1434129153311" TEXT="Referez">
@ -74,8 +81,7 @@
scheidet aus, wegen Wertsemantik
</p>
</body>
</html>
</richcontent>
</html></richcontent>
<icon BUILTIN="button_cancel"/>
</node>
<node CREATED="1434129204149" ID="ID_1688475597" MODIFIED="1434236628128" TEXT="GenNode">
@ -144,8 +150,7 @@
m.E. die einzig saubere Desgin-Variante!
</p>
</body>
</html>
</richcontent>
</html></richcontent>
</node>
</node>
</node>