class Hashable

Defined at line 19 of file ../../src/ui/lib/escher/util/hashable.h

A simple base class for self-hashing objects. Copying and moving is allowed;

it's up to subclasses to disallow, if they want.

Not thread-safe.

Public Methods

Hash hash ()

Return the cached hash, generating it if necessary.

Defined at line 22 of file ../../src/ui/lib/escher/util/hashable.h

bool operator== (const Hashable & other)

Defined at line 35 of file ../../src/ui/lib/escher/util/hashable.h

bool operator!= (const Hashable & other)

Defined at line 36 of file ../../src/ui/lib/escher/util/hashable.h

Protected Methods

void InvalidateHash ()

Subclasses must call whenever the object's state changes such that

GenerateHash() would return a different result.

Defined at line 41 of file ../../src/ui/lib/escher/util/hashable.h

bool HasCachedHash ()

Returns true if there is a cached hash value, i.e. if there has been no

call to InvalidateHash() since the last call of GenerateHash(). Mostly for

testing.

Defined at line 46 of file ../../src/ui/lib/escher/util/hashable.h

Records