Contents

init

Class initialiser.

Declaration

virtual bool init(
 OSObject *owner,
 Action action = 0);

Parameters

  • owner:

    Owner of this, newly created, instance of the IOCommandGate. This argument will be used as the first parameter in the action callout.

  • action:

    Pointer to a C function that is called whenever a client of the IOCommandGate calls runCommand. NB Can be a C++ member function but caller must cast the member function to $link IOCommandGate::Action and they will get a compiler warning. Defaults to zero, see $link IOEventSource::setAction.

Return Value

True if inherited classes initialise successfully.

Overview

Initialiser for IOCommandGate operates only on newly 'newed' objects. Shouldn't be used to re-init an existing instance.

See Also

Miscellaneous