2022 April Release

Software Component COOHASHOBJ@1.1 Permanent link for this heading

This software component provides the ability to store objects that are identified with a unique key in a hash table. The object address of objects stored in a hash table is computed with a hash function from the provided unique key. This allows to find an object stored in a hash table in a very efficient way without using queries.

Classes Permanent link for this heading

Component

Reference

Description

COOHASHOBJ@1.1

HashTable

Hash Table

Properties Permanent link for this heading

Type

Property

Name

AttributeStringDef

checkattr

String Property for Comparison

CollisionHandling

collhandling

Collision Handling Strategy

COOStore

coostore

COO Store of Objects

AttributeBoolDef

delattr

Boolean Property to Check "Deleted" Objects

integer

nrobjs

Maximum Number of Objects

ObjectClass

objclass

Object Class

integer

startobjid

Object Number of First Object

Actions Permanent link for this heading

Return Type

Signature

void

AttrCheckSet(
  AttributeDefinition attrdef,
  ref optional any value,
  any oldvalue)

void

CreateHashTable(
  ref object coost,
  ref object hashtable,
  integer nrobjs,
  object checkattr,
  optional object delattr,
  optional CollisionHandling collhandling)

void

GetHashedObject(
  string keystr,
  out object object,
  out optional integer steps)

void

GetHashedObjects(
  string[] keystrlist,
  out object[] objectlist,
  out boolean[] foundlist,
  out optional integer[] stepslist)

void

GetNextHash(
  integer hashlen,
  integer hashkey,
  ref integer nexthashkey,
  optional CollisionHandling collhandling)

void

GetOrCreateHashedObject(
  object objclass,
  string keystr,
  out object object,
  out optional boolean created,
  out optional integer steps)

void

GetOrCreateHashedObjects(
  object[] objclasslist,
  string[] keystrlist,
  out object[] objectlist,
  out optional boolean[] createdlist,
  out optional integer[] stepslist)

void

HashString(
  integer hashlen,
  string keystr,
  out integer hashkey)

Types Permanent link for this heading

Component

Reference

Description

COOHASHOBJ@1.1

CollisionHandling

This type enumerates the provided collision handling functions

ErrorMessages Permanent link for this heading

Component

Reference

Description

COOHASHOBJ@1.1

ERR_HASHFULL

Hash table full, no further keys available

COOHASHOBJ@1.1

ERR_INVALCHANGE

Property "%s" must not be changed any more

COOHASHOBJ@1.1

ERR_INVALNROBJS

Number of objects in hash table not defined

COOHASHOBJ@1.1

ERR_INVALOBJCLASS

Object class "%s" not valid for hash table

COOHASHOBJ@1.1

ERR_INVCOLLHANDLING

No valid collision handling strategy defined

COOHASHOBJ@1.1

ERR_NOCHECKATTR

No valid string property defined for comparing objects

COOHASHOBJ@1.1

ERR_NODELATTR

No valid Boolean property for checking "deleted" objects defined

COOHASHOBJ@1.1

ERR_NOTFOUND

Object with key "%s" not found in hash table

ServiceTableDefinitions Permanent link for this heading

Component

Reference

Description

COOHASHOBJ@1.1

HashTableTableDef

Hash Tables

Strings Permanent link for this heading

Component

Reference

Description

COOHASHOBJ@1.1

STR_OBJNAME

Hash table for %1$ld objects of class "%2$s"