Important: The information in this document is obsolete and should not be used for new development.
The Collection Resource
The Collection Manager provides theGetNewCollection
function, described on page 5-99, to create a new collection object and initialize it using information stored in a collection ('cltn'
) resource. Listing 5-28 shows the structure of the collection resource in Rez format.Listing 5-28 A Rez template for a
'cltn'
resource
type 'cltn' { longint = $$CountOf(ItemArray); array ItemArray { longint; /* tag */ longint; /* id */ boolean itemUnlocked = false, /* defined attributes */ itemLocked = true; boolean itemNonPersistent = false, itemPersistent = true; unsigned bitstring[14] = 0; /* reserved attributes */ unsigned bitstring[16] userBits; /* user attributes */ wstring; align word; }; };The collection resource has two parts:
Each item in the array specifies
- a count of the number of items in the resource
- an array of items
- the collection tag for that item
- the collection ID for the item
- a Boolean value representing the lock attribute for the item
- a Boolean value representing the persistence attribute for the item
- 14 bits representing the 14 reserved attributes for the item
- 16 bits representing the 16 user-defined attributes for the item
- a string containing the variable-length data for the item