You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SelectEntries - Selects the resource entries matching the given predicate and returns an array of selected entries.
SomeEntries - Returns true if one or more resource entries match the given predicate else false. This is a generalised version of the existing EntryExists method.
EveryEntry - Returns true if all resource entries match the given predicate else false.
ForEachEntry - Two overloaded methods. The first unconditionally calls the given callback for each resource entry. The 2nd only calls the callback if the given criteria are satisfied.
MapEntries<T> - Two overloaded methods that map resource entries onto some other type and returns an array of the new type. The first overload maps every resource while the second includes maps only entries that match the given criteria.
FindEntry - Overload of the existing method that finds and returns the first resource entry that matches the given predicate. Returns nil if there is no match.
FindEntryIndex - Overload of the existing method that finds the index of the first resource entry that matches the given predicate. Returns -1 if there is no match.
FindUniqueResTypes - Returns an array containing the set of string representations of the resource types of resource entries that match the given criteria.
FindUniqueLanguageIDs - Returns an array containing the set language IDs of resource entries that match the given criteria.
The text was updated successfully, but these errors were encountered:
ForEachEntry - Two overloaded methods. The first unconditionally calls the given callback for each resource entry. The 2nd only calls the callback if the given criteria are satisfied.
A better name for the 2nd version of ForEachEntry (with the predicate) would be ForSomeEntries.
At present there is one method of
TPJResourceFile
that can be used to find resources:But this method only finds the first matching resource and the ability to specify search criteria is limited.
Searching would be improved if:
An iterator function and possibly a map function would also be useful.
Possible methods would be:
Descriptions:
SelectEntries
- Selects the resource entries matching the given predicate and returns an array of selected entries.SomeEntries
- Returns true if one or more resource entries match the given predicate else false. This is a generalised version of the existingEntryExists
method.EveryEntry
- Returns true if all resource entries match the given predicate else false.ForEachEntry
- Two overloaded methods. The first unconditionally calls the given callback for each resource entry. The 2nd only calls the callback if the given criteria are satisfied.MapEntries<T>
- Two overloaded methods that map resource entries onto some other type and returns an array of the new type. The first overload maps every resource while the second includes maps only entries that match the given criteria.FindEntry
- Overload of the existing method that finds and returns the first resource entry that matches the given predicate. Returns nil if there is no match.FindEntryIndex
- Overload of the existing method that finds the index of the first resource entry that matches the given predicate. Returns -1 if there is no match.FindUniqueResTypes
- Returns an array containing the set of string representations of the resource types of resource entries that match the given criteria.FindUniqueLanguageIDs
- Returns an array containing the set language IDs of resource entries that match the given criteria.The text was updated successfully, but these errors were encountered: