-
Notifications
You must be signed in to change notification settings - Fork 0
require
- ACE Directive*
Requires a certain interface to be registered, or a certain interface implementation (dependency), and creates a pointer to the interface.
If the interface is not available, the module will fail to load (or attach.)
For optional interfaces, the $#use directive should be used.
- $#require scope interfaceType
- $#require scope interfaceType pointerName
- $#require scope interfaceType pointerName// //interfaceIdOrName
- $#require 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.