HFByteRangeAttributeArray Class Reference

A class that represents sets of attributes, attached to ranges of bytes.

List of all members.

Public Member Functions

(NSSet *) - attributesAtIndex:length:
(NSSet *) - attributesInRange:
(HFRange- rangeOfAttribute:
(void) - addAttribute:range:
(void) - removeAttribute:range:
(void) - removeAttribute:
(void) - removeAttributes:
(BOOL) - isEmpty
(NSEnumerator *) - attributeEnumerator
(void) - byteRange:wasReplacedByBytesOfLength:
(void) - transferAttributesFromAttributeArray:range:baseOffset:validator:


Member Function Documentation

- (NSSet *) attributesAtIndex: (unsigned long long)  index
length: (unsigned long long *)  length 

Returns the set of attributes at the given index, and the length over which those attributes are valid (if not NULL).

- (NSSet *) attributesInRange: (HFRange range  

Returns the set of attributes within the given range.

- (HFRange) rangeOfAttribute: (NSString *)  attribute  

Returns the first range of a given attribute. If it is not present, returns {ULLONG_MAX, ULLONG_MAX}

- (void) addAttribute: (NSString *)  attributeName
range: (HFRange range 

Adds a given attribute for a given range.

- (void) removeAttribute: (NSString *)  attributeName
range: (HFRange range 

Removes the given attribute within the given range.

- (void) removeAttribute: (NSString *)  attributeName  

Removes the given attribute entirely.

- (void) removeAttributes: (NSSet *)  attributeName  

Removes the given attributes entirely.

- (BOOL) isEmpty  

Returns whether the receiver is empty. This should be a count instead.

- (NSEnumerator *) attributeEnumerator  

Returns an NSEnumerator of the attributes. The attributes are returned in order, but there is no way to get the range of each attribute.

- (void) byteRange: (HFRange srcRange
wasReplacedByBytesOfLength: (unsigned long long)  replacementLength 

Called from HFByteArray to indicate when the bytes have changed, and the attributes need to be fixed up.

- (void) transferAttributesFromAttributeArray: (HFByteRangeAttributeArray *)  array
range: (HFRange range
baseOffset: (unsigned long long)  baseOffset
validator: (NSString *)  allowTransfer 

Transfer attributes in the given range from array, adding baseOffset to each attribute range. range is interpreted as a range in array. If validator is not NULL, then it is called for each attribute; a YES return allows it to be added and a NO return prevents it.


The documentation for this class was generated from the following file:

Generated on Thu Dec 8 10:06:35 2011 for HexFiend by  doxygen 1.5.9