Debian Codegraph @

include/icomparablenode.h

raw
1 #pragma once
2
3 #include "inode.h"
4 #include <string>
5
6 namespace scene
7 {
8
9 /**
10 * Prototype of a comparable scene node, providing hash information
11 * for comparison to another node. Nodes of the same type can be compared against each other.
12 */
13 class IComparableNode :
14 public virtual INode
15 {
16 public:
17 virtual ~IComparableNode() {}
18
19 // Returns the fingerprint (checksum) of this node, to allow for quick
20 // matching against other nodes of the same type. Fingerprints of different
21 // types are not comparable, be sure to check the node type first.
22 virtual std::string getFingerprint() = 0;
23 };
24
25 // The number of digits that are considered when hashing floating point values in fingerprinting
26 constexpr std::size_t SignificantFingerprintDoubleDigits = 6;
27
28 }