3 CLASS(DataSource, Object)
5 * get entry `i` passing `name` and `icon` through `returns` if it is not null
6 * returns `DataSource_false` if out of bounds
7 * otherwise returns an entity or `DataSource_true`
9 METHOD(DataSource, getEntry, entity(int i, void(string name, string icon) returns));
10 /** return the index of the first match for `find`. optional */
11 METHOD(DataSource, indexOf, int(string find));
12 /** reload all entries matching `filter` returning how many matches were found */
13 METHOD(DataSource, reload, int(string filter));
14 /** cleanup on shutdown. optional */
15 METHOD(DataSource, destroy, void(entity));
16 entity DataSource_true;
17 entity DataSource_false;
18 INIT_STATIC(DataSource) {
19 DataSource_true = NEW(Object);
20 DataSource_false = NULL;