LOButtonTokeniser Class Reference
The button tokeniser takes button presses one at a time, and where needed compiles them into combined tokens (i.e.
More...
#import <LOButtonTokeniser.h>
|
Public Member Functions |
(BOOL) | - addToken: |
| Proces a button custom button press, via a command token.
|
(BOOL) | - digit: |
| Process a digit button press.
|
(BOOL) | - dotButton |
| Process an dot (Decimal place) button press.
|
(BOOL) | - plus |
| Process a + button press.
|
(BOOL) | - minus |
| Process a minus button press.
|
(BOOL) | - thru |
| Process a THRU button press.
|
(BOOL) | - at |
| Process an @ button press.
|
(BOOL) | - on |
| Process an ON button press.
|
(BOOL) | - off |
| Process an OFF button press.
|
(BOOL) | - solo |
| Process a SOLO button press.
|
(BOOL) | - releaseButton |
| Process a RELEASE button press.
|
(BOOL) | - lastButton |
| Process an LAST button press.
|
(BOOL) | - enter |
| If at least one button has been pressed, that has been accepted by the command processor then the command will be sent to the processor for execution.
|
(void) | - clear |
| Reset all button presses.
|
(BOOL) | - backSpace |
| Remove the last button pressed, this can be called as many times as needed.
|
(BOOL) | - checkTokens |
| This is an internal function, called after every button press.
|
(NSArray *) | - tokeniseCommand |
| Get the current set of button presses as an array of tokens that can be passed to the command processor.
|
(BOOL) | - submitCommand |
| Submit the commnad to the commnad processor.
|
(NSString *) | - currentCommandString |
| Get the current equivilant command string for the button presses.
|
(LOCommandProcessor *) | - commandProcessor |
| Get the command processor this button tokeniser will use.
|
Protected Attributes |
LOCommandProcessor * | commandProcessor |
NSMutableArray * | tokens |
Detailed Description
The button tokeniser takes button presses one at a time, and where needed compiles them into combined tokens (i.e.
for numbers), and passes them into the command processor. Because this is done on each button press errors can be detected immediatly. However it requires specific buttons for THRU, ON, RELEASE etc.
Member Function Documentation
Proces a button custom button press, via a command token.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
- Returns:
- YES if the button was accepted
Process an @ button press.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
- Returns:
- YES If the button press was accepted.
Remove the last button pressed, this can be called as many times as needed.
- Returns:
- YES if the button was removed
This is an internal function, called after every button press.
It checks with the command processor to validate the new command with the last button press
Reset all button presses.
Get the command processor this button tokeniser will use.
- (BOOL) digit: |
|
(unsigned) |
theDigit |
|
|
Process a digit button press.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
- Parameters:
-
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
- Returns:
- YES If the button press was accepted.
Process an dot (Decimal place) button press.
- Returns:
- YES If the button press was accepted.
If at least one button has been pressed, that has been accepted by the command processor then the command will be sent to the processor for execution.
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
The return value will be the status of the execution.
- Returns:
- YES If the button press was accepted.
Process an LAST button press.
The LAST button is a shortcut to entering the last range of channels that were entered by the user.
- Returns:
- YES If the button press was accepted.
Process a minus button press.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
- Returns:
- YES If the button press was accepted.
Process an OFF button press.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
- Returns:
- YES If the button press was accepted.
Process an ON button press.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
- Returns:
- YES If the button press was accepted.
Process a + button press.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
- Returns:
- YES If the button press was accepted.
Process a RELEASE button press.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
- Returns:
- YES If the button press was accepted.
Process a SOLO button press.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
- Returns:
- YES If the button press was accepted.
Submit the commnad to the commnad processor.
This is an internal function that is called once the correct end of commnad button has been pressed.
Process a THRU button press.
If the button press does not complete a command the return value reflects the validity of this button press within the context of the complete command as validated by the command processor.
If the commnad processor itendifies this as the last button to be pressed to comeplete a command then the command will be exectued and the return value will be the status of the the execution.
After a command is executed all button presses are reset, no matter what the return status of the command execution was.
- Returns:
- YES If the button press was accepted.
- (NSArray *) tokeniseCommand |
|
|
|
|
Get the current set of button presses as an array of tokens that can be passed to the command processor.
This is an internal function that gets called as needed when the command is due to be processed.
The documentation for this class was generated from the following files: