Lumiera  0.pre.03
»edit your freedom«
frameid.hpp
Go to the documentation of this file.
1 /*
2  FRAMEID.hpp - distinct identification of a single data frame
3 
4  Copyright (C)
5  2008, 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 
30 #ifndef LUMIERA_FRAMEID_H
31 #define LUMIERA_FRAMEID_H
32 
33 
34 #include <boost/operators.hpp>
35 
36 namespace lumiera {
37 
38 
45  struct NodeID
46  {
48  ulong id;
49  ulong generation;
50  ulong childSum;
51 
52  NodeID()
53  : id (++currID),
54  generation(0),
55  childSum(0)
56  { }
57 
58  static ulong currID;
59  };
60 
61 
62 
63 
72  class FrameID : boost::totally_ordered<FrameID>
73  {
74  long dummy;
75  public:
76  FrameID(long dum=0) : dummy(dum) {}
77  operator long () { return dummy; }
78 
79  bool operator< (const FrameID& other) const { return dummy < other.dummy; }
80  bool operator== (const FrameID& other) const { return dummy == other.dummy; }
81  };
82 
83 
84 
85 
86 } // namespace lumiera
87 #endif
Identification tuple for addressing frames unambiguously.
Definition: frameid.hpp:72
static ulong currID
storage for the unique node-ID counter
Definition: frameid.hpp:58
Lumiera public interface.
Definition: advice.cpp:104
Identification tuple for denoting render nodes unambiguously.
Definition: frameid.hpp:45