Class Fox::FXDict
In: FXDict.rb
Parent: FXObject

The dictionary class maintains a fast-access hash table of entities indexed by a character string. It is typically used to map strings to pointers; however, overloading the createData and deleteData members allows any type of data to be indexed by strings.

Methods
clear    each_key    empty?    has_key?    include?    key    keys    marked?    member?    new    next    prev   
External Aliases
length -> size
Attributes
first  [R] 

Position of first filled slot, or >= total [Integer]

last  [R] 

Position of last filled slot, or -1 [Integer]

length  [R] 

Total number of entries in the table [Integer]

Public Class methods
new()

Construct an empty dictionary.

Public Instance methods
key(pos)

Return key at position pos.

marked?(pos)

Return mark flag of entry at position pos.

next(pos)

Return position of next filled slot after pos in the hash table, or a value greater than or equal to total if no filled slot was found.

prev(pos)

Return position of previous filled slot before pos in the hash table, or a -1 if no filled slot was found.

clear()

Clear all entries

each_key() {|key| ...}

Iterate over the keys in this dictionary.

keys()

Returns a new array populated with the keys from this dictionary.

has_key?(key)

Returns true if the given key is present.

This method is also aliased as include? member?
include?(key)

Alias for has_key?

member?(key)

Alias for has_key?

empty?()

Returns true if this dictionary contains no key-value pairs.