Skip to content

Commit

Permalink
It's done, I think…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Dovey committed Jul 19, 2011
1 parent 2307988 commit 111731f
Show file tree
Hide file tree
Showing 5 changed files with 313 additions and 34 deletions.
68 changes: 52 additions & 16 deletions AQAppStateMachine/AQAppStateMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@

/**
Run a notification block when any bit in a range is modified.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param block The block to run when a modification occurs.
*/
- (void) notifyForChangesToStateBitsInRange: (NSRange) range
usingBlock: (void (^)(void)) block;

/**
Run a notification block when any bit within a masked range is modified.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param mask A mask showing which bits within the range should be monitored.
@param block The block to run when a modification occurs.
*/
Expand All @@ -101,7 +101,7 @@

/**
Run a notification block when any bit within a masked eight-byte range is modified.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param mask A mask showing which bits within the range should be monitored.
@param block The block to run when a modification occurs.
*/
Expand All @@ -111,7 +111,7 @@

/**
Run a notification block when any bit within a masked range is modified.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param mask A bitfield mask showing which bits within the range should be monitored.
@param block The block to run when a modification occurs.
*/
Expand All @@ -121,27 +121,27 @@

/**
Run a notification block when the bits in a given range exactly match a given value.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param value The value against which to compare the range's bits.
@param block The block to run when a modification occurs.
*/
- (void) notifyForEqualityOfStateBitsInRange: (NSRange) range
toIntegerValue: (NSUInteger) value
block: (void (^)(void)) block;
usingBlock: (void (^)(void)) block;

/**
Run a notification block when the bits in a given range exactly match a given 64-bit value.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param value The value against which to compare the range's bits.
@param block The block to run when a modification occurs.
*/
- (void) notifyForEqualityOfStateBitsInRange: (NSRange) range
to64BitValue: (UInt64) value
block: (void (^)(void)) block;
usingBlock: (void (^)(void)) block;

/**
Run a notification block when the bits in a given range exactly match a given bitfield value.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param value The value against which to compare the range's bits.
@param block The block to run when a modification occurs.
*/
Expand All @@ -151,39 +151,39 @@

/**
Run a notification block when the bits in a given range exactly match a given masked value.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param mask A mask denoting which bits within the range should be compared.
@param value The value against which to compare the range's bits.
@param block The block to run when a modification occurs.
*/
- (void) notifyForEqualityOfStateBitsInRange: (NSRange) range
maskedWith: (NSUInteger) mask
toIntegerValue: (NSUInteger) value
block: (void (^)(void)) block;
usingBlock: (void (^)(void)) block;

/**
Run a notification block when the bits in a given range exactly match a given masked 64-bit value.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param mask A mask denoting which bits within the range should be compared.
@param value The value against which to compare the range's bits.
@param block The block to run when a modification occurs.
*/
- (void) notifyForEqualityOfStateBitsInRange: (NSRange) range
maskedWith: (UInt64) mask
to64BitValue: (UInt64) value
block: (void (^)(void)) block;
usingBlock: (void (^)(void)) block;

/**
Run a notification block when the bits in a given range exactly match a given masked bitfield.
@param index The range of bits to watch for changes.
@param range The range of bits to watch for changes.
@param mask A mask bitfield denoting which bits within the range should be compared.
@param value The bitfield against which to compare the range's bits.
@param block The block to run when a modification occurs.
*/
- (void) notifyForEqualityOfStateBitsInRange: (NSRange) range
maskedWith: (AQBitfield *) mask
toValue: (AQBitfield *) value
block: (void (^)(void)) block;
usingBlock: (void (^)(void)) block;

@end

Expand Down Expand Up @@ -354,7 +354,7 @@
@param block A block to run upon any changes.
*/
- (void) notifyEqualityOfStateMachineValuesWithName: (NSString *) name
toUInt64: (NSUInteger) value
toUInt64: (UInt64) value
usingBlock: (void (^)(void)) block;

/**
Expand All @@ -367,6 +367,42 @@
toBits: (AQBitfield *) bits
usingBlock: (void (^)(void)) block;

/**
Request notification whenever the masked content of a named enumeration matches a 32-bit scalar value.
@param name The name of the enumeration to monitor.
@param mask A mask defining which bits to compare.
@param value The value against which to compare the enumeration.
@param block A block to run upon any changes.
*/
- (void) notifyEqualityOfStateMachineValuesWithName: (NSString *) name
maskedWith: (NSUInteger) mask
toInteger: (NSUInteger) value
usingBlock: (void (^)(void)) block;

/**
Request notification whenever the masked content of a named enumeration matches a 64-bit scalar value.
@param name The name of the enumeration to monitor.
@param mask A mask defining which bits to compare.
@param value The value against which to compare the enumeration.
@param block A block to run upon any changes.
*/
- (void) notifyEqualityOfStateMachineValuesWithName: (NSString *) name
maskedWith: (UInt64) mask
toUInt64: (UInt64) value
usingBlock: (void (^)(void)) block;

/**
Request notification whenever the masked content of a named enumeration matches a bitfield.
@param name The name of the enumeration to monitor.
@param mask A mask defining which bits to compare.
@param bits The bitfield against which to compare the enumeration.
@param block A block to run upon any changes.
*/
- (void) notifyEqualityOfStateMachineValuesWithName: (NSString *) name
maskedWith: (AQBitfield *) mask
toBits: (AQBitfield *) bits
usingBlock: (void (^)(void)) block;

@end

/**
Expand Down
Loading

0 comments on commit 111731f

Please sign in to comment.