Solid Fluid System Solutions  
Home Software About Hardware Firmware

Document Icon VConsole (Library)
Document Icon Crypto
Document Icon Archive
Document Icon Container
Document Icon Pipe
Document Icon Compress
Document Icon Math
Document Icon Vector
Document Icon DateTime
Document Icon List/Array
Current Document Icon HashIntegerFloat
Document Icon Database
Document Icon Thread
Document Icon String
Document Icon Machine
Document Icon Regex
Document Icon SGMLParse
Document Icon HTTPHeader
Document Icon Comm
Document Icon Collab
Document Icon HierAgent
Document Icon Resource
Document Icon Colour
Document Icon Image

Hash/Integer/Float

VHash, VInteger and VFloat are a group of lookup objects. Each operates on the basis of an index key and a stored value.

Values stored in these objects are always referenced by their key. When values are added, their keys are automatically placed into a key list in a sorted order, using Newtons method. When retrieved, keys are extracted using Newtons method. This scheme makes for a fast lookup of key value pairs. The underlying key list is actually a scalable array by necessity, and consequently additions and removals are not quite as fast as lookups.

Separate classes are implemented to allow combinations of key/value pair types. All combinations of the following key and value types are possible.

Key types

  • Hash (string)
  • Signed integer
  • Unsigned integer
  • Double

Value types

  • VObject pointer
  • Signed integer
  • Unsigned integer
  • Atom

For each value type except atom, key value pairs may be added, removed, replaced and extracted. An atom is essentially an unsigned integer but atoms may only be incremented or decremented. An atom may never be less than or equal to zero. A non existant atom which is incremented is automatically created and set to 1. An atom which is decremented to zero is automatically removed.

All of the above implementations work with the list type to allow keys to be retrieved in groups with unary and binary operators. One may request all keys, all keys greater, all keys greater than and less than, and so on. Objects with hash key types only support group retrieval where all keys are requested.

Copyright © Solid Fluid 2007-2022
Last modified: SolFlu  Mon, 08 Jun 2009 01:23:32 GMT