Item types are custom data types that can be exposed to the Universal Query System (UQS) under a specific name.
Items are used in various places inside UQS:
- They represent the reasoning space of a query and will be "evaluated" one after another by a running query.
- They are used by input parameters for Generators, Functions, and Evaluators.
- They represent the return value of Functions.
Item types can optionally be registered with callbacks for visualizing the individual items that are being evaluated in a query.
A typical item type would be a Vec3 to represent points that need to be scored and tested in the 3D world.
The UQS Standard Library already provides several types geared around
Vec3, most notably
For in-depth details as to how these item types (among others) are brought into the UQS core, you can check out the private
Registering Item Types
Registration of item types happens in C++ code by using the convenient helper class
CItemFactory<>, this comes out of the box with UQS:
Registration then happens through a static global instance of the
CItemFactory<> class template:
You can register as many different item types as you want. If doing so, make sure that they all go under different GUIDs and that no data type gets registered more than once.
To finally expose your item types (and generators, functions and evaluators) to the UQS core, you'd just call this static helper method once receiving the