Skip to content

Commit 40364dc

Browse files
committed
More detail for the ReadMe
1 parent 79a8b5d commit 40364dc

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,37 @@ In the command itself - named injection only required where you have multiple ev
5050
[Inject(name='stuffHappened')]
5151
public var stuffHappenedEvent:SomeOtherEvent;
5252

53-
etc - but there's a common use case where you'd only be interested in the fact that all 3 events have fired and wouldn't need the events at all, or would only need the last one.
53+
etc - but there's a common use case where you'd only be interested in the fact that all 3 events have fired and wouldn't need the events at all, or would only need the last one.
54+
55+
56+
ICompoundCommandMap has an API with 3 functions:
57+
58+
function mapToEvents(commandClass:Class, oneshot:Boolean = false, requiredInOrder:Boolean = false):ICompoundCommandConfig;
59+
60+
function hasCompoundCommand(commandClass:Class):Boolean;
61+
62+
function unmapCompoundCommand(commandClass:Class):ICompoundCommandConfig;
63+
64+
65+
ICompoundCommandConfig - returned when mapping / unmapping - has the API:
66+
67+
function addRequiredEvent(eventType:String, eventClass:Class = null, named:String = ""):ICompoundCommandConfig;
68+
69+
// all events set using addRequiredEvent
70+
function get requiredEvents():Array;
71+
72+
// events that have not yet fired
73+
function get remainingRequiredEvents():Array;
74+
75+
// whether the events are only picked up in order - ie event2 is ignored until after event1 is received
76+
function get requiredInOrder():Boolean;
77+
78+
/* returns an array of the events that have arrived so far as a strong typed IEventAsPayload with 3 properties:
79+
the event, the event class and the event name if it was mapped with a name */
80+
function get eventsAsPayloads():Array;
81+
82+
function get oneshot():Boolean;
83+
5484

5585
See tests/org/robotlegs/base/CompoundCommandMapTest for full usage examples.
5686

0 commit comments

Comments
 (0)