Lumiera  0.pre.03
»edit your freedom«
sub-id.hpp File Reference

Go to the source code of this file.

Description

Extensible symbolic ID type.

Remarks
this is a design sketch (from 9/2009) an not used anywhere as of 3/2017...

My observation is that, during design, I did run again and again into a specific situation, which I then needed to circumvent in lack of a first class solution. Learning from that experiences, I start building this structured ID template.

  • it shall be an symbolic identifier, not an artificial ID
  • the basic value set should be limited and statically type safe.
  • possibility of structured adornments and variations
  • optionally concealing these extensions from the interface level

The first attempt to build such an entity is based on standard techniques, disregarding performance and memory footprint considerations.

Todo:
1/2016 this idea seems very reasonable, and we should just make it robust and usable, along the lines pointed out by that draft
  • use std::tuple as storage
  • remove the format-util dependency (!) ////////////////////////////////TICKET #985
  • provide a hash implementation for real
  • extend to arbitrary number of sub-dimensions (variadic)
  • implement comparisons as you'd do for any algebraic type
  • provide a metaprogramming facility to get an id tuple
See also
SubID_test
MultiFact

Definition in file sub-id.hpp.

#include "lib/format-util.hpp"
#include <boost/functional/hash.hpp>
#include <string>

Classes

class  ExtendedSubId< I, SUZ >
 
class  SubId< I >
 
class  SubID
 
class  SubId< I >
 

Functions

size_t hash_value (SubID const &sID)
 
bool operator== (SubID const &id1, SubID const &id2)
 

Namespaces

 lib
 Implementation namespace for support and library code.