ORIGINAL
Loading...
Searching...
No Matches
Public Member Functions | List of all members
original::hashable< DERIVED > Class Template Referenceabstract

Forward declaration of hashable interface template. More...

#include <hash.h>

Inheritance diagram for original::hashable< DERIVED >:
Inheritance graph
Collaboration diagram for original::hashable< DERIVED >:
Collaboration graph

Public Member Functions

virtual u_integer toHash () const noexcept
 Computes the hash of the object.
 
virtual bool equals (const DERIVED &other) const noexcept
 Compares two objects for equality.
 
virtual ~hashable ()=0
 Virtual destructor.
 

Detailed Description

template<typename DERIVED>
class original::hashable< DERIVED >

Forward declaration of hashable interface template.

Interface for user-defined hashable types.

Template Parameters
DERIVEDThe derived class that inherits from hashable.
DERIVEDThe derived type (CRTP pattern)

Provides default implementations for:

Classes implementing this interface automatically satisfy the HashTraits concept, which requires both toHash() method and equality comparison support.

Usage Example:

class MyType : public hashable<MyType> {
public:
bool operator==(const MyType&) const { return true; }
// Optionally override toHash() and equals()
};
Forward declaration of hashable interface template.
Definition hash.h:220
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
bool operator==(const autoPtr< T, DER, DEL > &ptr, const std::nullptr_t &null)
Equality comparison with nullptr.
Definition autoPtr.h:750
See also
HashTraits

Constructor & Destructor Documentation

◆ ~hashable()

template<typename DERIVED >
original::hashable< DERIVED >::~hashable ( )
pure virtualdefault

Virtual destructor.

Note
Required for proper polymorphic behavior

Member Function Documentation

◆ equals()

template<typename DERIVED >
bool original::hashable< DERIVED >::equals ( const DERIVED other) const
virtualnoexcept

Compares two objects for equality.

Parameters
otherThe object to compare with
Returns
True if equal

Default implementation uses operator== Override for custom equality logic.

◆ toHash()

template<typename DERIVED >
original::u_integer original::hashable< DERIVED >::toHash ( ) const
virtualnoexcept

Computes the hash of the object.

Returns
A hash value

Default implementation uses byte-wise hashing of object representation. Override for custom hashing logic.

Reimplemented in original::autoPtr< TYPE, DERIVED, DELETER >, original::autoPtr< asyncWrapper< TYPE >, strongPtr< asyncWrapper< TYPE >, DELETER >, DELETER >, original::autoPtr< asyncWrapper< void >, strongPtr< asyncWrapper< void >, DELETER >, DELETER >, original::autoPtr< original::filter< TYPE >, strongPtr< original::filter< TYPE >, DELETER >, DELETER >, original::autoPtr< TYPE, ownerPtr< TYPE, deleter< TYPE > >, deleter< TYPE > >, original::autoPtr< TYPE, strongPtr< TYPE, DELETER >, DELETER >, original::autoPtr< TYPE, weakPtr< TYPE, DELETER >, DELETER >, original::containerAdapter< TYPE, SERIAL, ALLOC >, original::containerAdapter< original::strongPtr< original::taskDelegator::taskBase >, chain, allocator >, original::containerAdapter< priorityTask, vector, allocator >, original::containerAdapter< TYPE, blocksList, allocator >, original::containerAdapter< TYPE, chain, allocator >, original::iterationStream< TYPE, DERIVED >, original::iterationStream< bool, bitSet< allocator< bool > > >, original::iterationStream< hashNode *, vector< hashNode *, rebind_alloc_pointer > >, original::iterationStream< opts, chain< opts, allocator< opts > > >, original::iterationStream< original::hashTable::hashNode *, vector< original::hashTable::hashNode *, rebind_alloc_pointer > >, original::iterationStream< original::skipList::skipListNode *, vector< original::skipList::skipListNode *, allocator< original::skipList::skipListNode * > > >, original::iterationStream< original::strongPtr< original::filter< TYPE > >, chain< original::strongPtr< original::filter< TYPE > >, allocator< original::strongPtr< original::filter< TYPE > > > > >, original::iterationStream< original::strongPtr< original::taskDelegator::taskBase >, chain< original::strongPtr< original::taskDelegator::taskBase >, allocator< original::strongPtr< original::taskDelegator::taskBase > > > >, original::iterationStream< original::strongPtr< original::transform< TYPE > >, chain< original::strongPtr< original::transform< TYPE > >, allocator< original::strongPtr< original::transform< TYPE > > > > >, original::iterationStream< original::thread, array< original::thread, allocator< original::thread > > >, original::iterationStream< priorityTask, vector< priorityTask, allocator< priorityTask > > >, original::iterationStream< TYPE *, vector< TYPE *, allocator< TYPE * > > >, original::iterationStream< TYPE, array< TYPE, allocator< TYPE > > >, original::iterationStream< TYPE, blocksList< TYPE, allocator< TYPE > > >, original::iterationStream< TYPE, chain< TYPE, allocator< TYPE > > >, original::iterationStream< TYPE, forwardChain< TYPE, allocator< TYPE > > >, original::iterationStream< TYPE, vector< TYPE, allocator< TYPE > > >, original::iterationStream< underlying_type, array< underlying_type, rebind_alloc_underlying > >, original::async::sharedFuture< TYPE >, original::async::sharedFuture< void >, original::thread, original::time::duration, original::time::point, and original::time::UTCTime.


The documentation for this class was generated from the following file: