Next: , Previous: , Up: Resources   [Contents][Index]


14.3 Accessing Resource Values

The power and flexibility of resource management is the result of the way resource values in a resource database are accessed. A resource binding binding stored in the database generally contains only a partial resource name consisting of a mixture of name and class identifiers and wildcard elements (that is, *). To look up a resource value, an application program starts with two resource name lists of the same length containing no wildcard elements – a complete resource name and a complete resource class. The lookup algorithm returns the value for the resource binding whose resource name is the closest match to the complete name and class given. The definition of closest match takes into account the top-down, parent-child hierarchy of resource names and also the distinction between individual names and class names.