Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
Functions
hashTableFunction.h File Reference

These functions are used in PARCHashCodeTables by the MatchingRulesTable and ContentStore and PIT. They perform the equality and has generation needed by the PARCHashCodeTable. More...

#include <parc/algol/parc_HashCodeTable.h>
Include dependency graph for hashTableFunction.h:

Go to the source code of this file.

Functions

bool hashTableFunction_MessageNameEquals (const void *messageA, const void *messageB)
 
HashCodeType hashTableFunction_MessageNameHashCode (const void *messageA)
 

Detailed Description

These functions are used in PARCHashCodeTables by the MatchingRulesTable and ContentStore and PIT. They perform the equality and has generation needed by the PARCHashCodeTable.

Function Documentation

◆ hashTableFunction_MessageNameEquals()

bool hashTableFunction_MessageNameEquals ( const void *  messageA,
const void *  messageB 
)

Determine if the Names of two message instances are equal.

The following equivalence relations on non-null message instances are maintained:

  • It is reflexive: for any non-null reference value x, hashTableFunction_MessageNameEquals(x, x) must return true.
  • It is symmetric: for any non-null reference values x and y, message_Equals(x, y) must return true if and only if hashTableFunction_MessageNameEquals(y, x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if hashTableFunction_MessageNameEquals(x, y) returns true and hashTableFunction_MessageNameEquals(y, z) returns true, then hashTableFunction_MessageNameEquals(x, z) must return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of hashTableFunction_MessageNameEquals(x, y) consistently return true or consistently return false.
  • For any non-null reference value x, hashTableFunction_MessageNameEquals(x, NULL) must return false.
Parameters
aA pointer to a message instance.
bA pointer to a message instance.
Returns
true if the names of the two message instances are equal.

◆ hashTableFunction_MessageNameHashCode()

HashCodeType hashTableFunction_MessageNameHashCode ( const void *  messageA)

@function hashTableFunction_NameHashCode @abstract Computes the hash of the entire name in a message

Parameters
messageAis a message
Returns
A non-cryptographic hash of Name