These factory methods are used to create and destroy an InteractionLib instance. More...
Functions | |
IL_API InteractionLib * | CreateInteractionLib (FieldOfUse fieldOfUse) |
Creates a new InteractionLib instance with a default adapter, if available. More... | |
IL_API InteractionLib * | CreateInteractionLib (FieldOfUse fieldOfUse, IL_Logger *logger) |
Creates a new InteractionLib instance with a default adapter, if available. More... | |
IL_API InteractionLib * | CreateInteractionLib (FieldOfUse fieldOfUse, IL_Logger *logger, IL_AdapterFunctions *adapterFunctions) |
Creates a new InteractionLib instance with a custom adapter. More... | |
IL_API void | DestroyInteractionLib (InteractionLib *instance) |
Destroys an InteractionLib instance created by CreateInteractionLib() or its overloads. More... | |
These factory methods are used to create and destroy an InteractionLib instance.
For testing purposes, Interaction Library SDK clients can "mock" or "stub" the Interaction Library functionality by providing their own implementation of the InteractionLib interface. By using CreateInteractionLib() or its overloads, an actual Interaction Library implementation instance of the InteractionLib interface will be created.
IL_API InteractionLib* IL::CreateInteractionLib | ( | FieldOfUse | fieldOfUse | ) |
Creates a new InteractionLib instance with a default adapter, if available.
fieldOfUse | This mandatory flag denotes if the Interaction Library is used for interactive or analytical purposes. Please see the EULA and documentation for more information. |
IL_API InteractionLib* IL::CreateInteractionLib | ( | FieldOfUse | fieldOfUse, |
IL_Logger * | logger | ||
) |
Creates a new InteractionLib instance with a default adapter, if available.
fieldOfUse | This mandatory flag denotes if the Interaction Library is used for interactive or analytical purposes. Please see the EULA and documentation for more information. |
logger | Optional pointer to a structure with information about a callback function that will be called by the Interaction Library for logging purposes. If logger is nullptr , the Interaction Library does no logging related processing. The callback function is set in the IL_Logger::callback field. The level parameter denotes the highest log level at which the callback function will be called. For example, if "info" is specified, then the callback will be called for "error", "warning" and "info", but not for "debug" and "trace" The text parameter passed to the callback function points at a null terminated character array formatted in a format specified by Tobii. The parameter is only valid in the scope of the callback. The context parameter passed to the callback function is set in the IL_Logger::context field. |
IL_API InteractionLib* IL::CreateInteractionLib | ( | FieldOfUse | fieldOfUse, |
IL_Logger * | logger, | ||
IL_AdapterFunctions * | adapterFunctions | ||
) |
Creates a new InteractionLib instance with a custom adapter.
fieldOfUse | This mandatory flag denotes if the Interaction Library is used for interactive or analytical purposes. Please see the EULA and documentation for more information. |
logger | Optional pointer to a structure with information about a callback function that will be called by the Interaction Library for logging purposes. If logger is nullptr , the Interaction Library does no logging related processing. The callback function is set in the IL_Logger::callback field. The level parameter denotes the highest log level at which the callback function will be called. For example, if "info" is specified, then the callback will be called for "error", "warning" and "info", but not for "debug" and "trace" The text parameter passed to the callback function points at a null terminated character array formatted in a format specified by Tobii. The parameter is only valid in the scope of the callback. The context parameter passed to the callback function is set in the IL_Logger::context field. |
adapterFunctions | Pointer to an instance of the structure that defines the custom adapter. nullptr is a valid parameter value which means the default adapter will not be set. Without a valid adapter the following functions will do nothing and return Result::Warning_NoAdapterSet. |
WaitAndUpdate() , WaitForDeviceConnection() , Update() , UpdateStreamingDataOutput() , UpdateInteraction() ,
However, it is still possible to add interactors and subscribe to gaze focus events and data streams.
IL_API void IL::DestroyInteractionLib | ( | InteractionLib * | instance | ) |
Destroys an InteractionLib instance created by CreateInteractionLib() or its overloads.
instance | Pointer to an InteractionLib instance returned by the Interaction Library (as opposed to one created by a client for test purposes). If instance is nullptr , then nothing is done. |