This plugin contains groups indexed by name. Each group stored instances by UID. The group supports two kinds of data structures:
- set: union,complement,intersection
- list: sorting
In actions of this plugin, you can
- add/remove uid to/from a group
- shuffle a group
- sort by custom function
- pick instances from a group (using uid)
In conditions, you can
- retrieve a group
- test if a uid is in a group
In expressions, you can
- get uid from index (since group is a list)
- get index by uid
When instance destroyed, plugin will remove uid from groups automatically.
Here is an example.
You can sort the group by custom function.
1. Declare sorting function by "Condition: On sorting".
2. In this function, you can get two values from "Expression: CmpUIDA" and "Expression: CmpUIDB", using these two uid to pick up instances and compare them by your rule.
3. Finally, using "Action: Set compared result" to tell plugin which one is larger.
Advance: private group
"Expression: PrivateGroup" can return a special group name formatted by [code]"@" + uid + "$" + name[/code]. Group which created by these name will be destroyed automatically when instance had been destroyed.
For example, group "@10$aa","@10$bb" will be destroyed automatically when instance with (uid=10) has been destroyed.
PS. There is a small plugin which can provide "action:pick instance by UID". It can save events.