-
Notifications
You must be signed in to change notification settings - Fork 0
use
- ACE Directive*
Requests a certain interface to be used if registered, or a certain interface implementation (dependency), and creates a pointer to the interface.
If the interface is not available, the module will continue loading/attaching as normal, and the pointer will be null.
For interfaces that must be available, use the $#require directive instead.
- $#use scope interfaceType
- $#use scope interfaceType pointerName
- $#use scope interfaceType pointerName// //interfaceIdOrName
- $#use scope interfaceType pointerName// //interfaceIdOrName// //interfaceName
global or arena.
with global, requests the interface registered for ALLARENAS, and stores the pointer as a global.
for arena, requests the interface on attach registered to the arena, and stores the pointer in per-arena-data access with ($usearenadata())
the struct name of the interface. (for example Ichat)
(Optional)
the variable name to use for the pointer to the interface. by default, is foo for a type named Ifoo, or _bar for any other type named bar.
(Optional)
the interface identifier or implementation name. (for example I_CHAT).
by default, is derived from the interface type. I_FOO is assumed for types of the form Ifoo, and I_BAR is assumed for any other types of the form bar. expects identifiers to be in the form I_FOO, otherwise it will assume this is an implementation name.
(Optional)
the requested implementation name. this is only for advanced uses of interfaces.
if interfaceIdOrName is a name, using this parameter is not allowed.