Contenido principal

delete

R2026b

Delete clibgen.api.InterfaceDefinition object

Since R2026b

    Description

    delete(idef) deletes the interface definition idef and all the definition objects that it contains, such as the clibgen.api.ClassDefinition, clibgen.api.FunctionDefinition, and clibgen.api.EnumDefinition objects for the C++ symbols in the library. After you call delete, idef and any variables that refer to definition objects in idef are invalid.

    delete does not delete the interface file created by the build method. MATLAB® calls delete automatically when idef is destroyed, for example, when you clear the variable.

    example

    Examples

    collapse all

    Build a MATLAB interface to a C++ library defined by mylib.hpp, and then delete the interface definition.

    icfg = clibgen.api.InterfaceConfiguration("libname",HeaderFiles="mylib.hpp");
    idef = clibgen.api.InterfaceDefinition(icfg);
    if (idef.Buildable)
      build(idef);
    end
    delete(idef)

    Input Arguments

    collapse all

    Interface definition, specified as a clibgen.api.InterfaceDefinition object.

    Version History

    Introduced in R2026b