Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
hashable.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
5#ifndef JAWSMAKO_HASHABLE
6#define JAWSMAKO_HASHABLE
7
8
9#include <jawsmako/types.h>
10
16
17namespace JawsMako
18{
25 {
26 public:
27 virtual ~IHashable() {}
28
33 virtual uint64 hash() const
34 {
35 uint64 hashVal = 0;
36 updateHash(hashVal);
37 return hashVal;
38 }
39
40#ifdef SWIG
41 %apply unsigned long long &OUTPUT { uint64 &hash };
42#endif
47 virtual void updateHash(uint64 &hash) const = 0;
48#ifdef SWIG
49 %clear uint64 &hash;
50#endif
51 };
52
53}
54
55#endif
Simple interface to provide a consistent hashing method for Mako objects.
Definition hashable.h:25
virtual uint64 hash() const
Obtain a 64-bit hash of the receiving object.
Definition hashable.h:33
virtual ~IHashable()
Definition hashable.h:27
virtual void updateHash(uint64 &hash) const =0
Update the given hash to include the receiver.
unsigned long long uint64
Definition edltypes.h:35
Definition apexcustompostprocess.h:17