#include #include "assert.h" #include "commandline/parameters.h" #include "files/filters/filters.h" #include "memory/virtualmemory.h" #include "object.h" #include "resources/categories.h" #include "types/attributes.h" #include "types/composites/composites.h" #include "types/composites/dictionary.h" #include "types/typestrings.h" object defineFilter(const configure interpreter) { const cstring filtername[] = { #define each(FILTER) as \ #FILTER, foreach (filter) #undef each }; const object Instances = create[dicttype](0); for (size_t index = 0; index < allfilternames; ++index) { if (filteroperator(index)) { const object instance = cvn(string(filtername[index])); put[dicttype](instance, instance, Instances); } } return readonly(compile( defineGeneric(interpreter), array(((object []){ cvn(string("Category")), cvn(string("Filter")), cvn(string("InstanceType")), cvn(typestring((object){.type = nametype})), cvn(string("globalinstances")), readonly(Instances) })) )); }