Hi there,
my current pet project - an editor for SOPE templates (think of a specialized HTML editor) needs to deal with arrays of ranges for a variety of reasons (finding tags quickly, associating character locations with line numbers, etc.). Currently I'm doing this encapsulating NSRange structs into objects (by means of EDRange). I'm happy with the results that gives me, especially I can sort these ranges using various comparisons (by location, by length) to speed up certain use cases. However some DOUBT remains whether this is the most efficient thing to do it ... I don't really know how much hassle it would be to implement a subclass of NSMutableArray that operates on structs (NSRange) rather than on objects? Probably the best thing would be to have something like this defined generically (probably with some macros). Or should I go with ObjC++ and use STL for this (I don't really have a clue about STL, so probably this idea is plain sick ?
Someone please wise me up. Cheers!