Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision |
Your text |
Line 11: |
Line 11: |
| === Project Information === | | === Project Information === |
| ==== Summary ==== | | ==== Summary ==== |
− | This project focuses on the addition of an exec option to the libged ''search'' command. The idea is similar to the exec option of the ''find'' command in Unix. Like ''find'', ''search'' is a powerful tool for generating a list of matches of given a search pattern. However, while the search pattern may be specified using diverse criteria, there is currently no option for performing operations on the results.<br/>
| |
− | <br/>
| |
− | Suppose major changes had recently been made to a model. ''search'' could be use to find all empty combinations (analog to directories in Unix):
| |
− | search -nnodes 0
| |
− | In order to remove all of the combinations returned, a user would have to either ''kill'' each one manually, or write a Tcl script to iterate over them. The former method is not feasible for a large number of results. The latter involves multiple time consuming steps. Performing operations on search results is a common enough problem that having integrated support is well worth the implementation effort:
| |
− | search -nnodes 0 -exec kill {};
| |
− | <br/>
| |
− | Command names supplied via the exec argument must map to libged functions, so that ''search'' can call them. Currently, these mappings are done outside of libged. A major milestone in this project will be creating these mappings inside libged, by having each command add itself to a registry.<br/>
| |
− | <br/>
| |
− | While MGED and Archer themselves will eventually rely upon the libged command registry for mapping command names to functions, it is not yet clear if this migration is within the scope of the project (<font color=red>'''TBD'''</font>).
| |
− |
| |
| ==== Description ==== | | ==== Description ==== |
| *code references/samples/etc. | | *code references/samples/etc. |