Foundry.CompileCommands

g Foundry.CompileCommands Foundry.CompileCommands GObject.Object GObject.Object GObject.Object->Foundry.CompileCommands

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (file)

lookup (file, system_includes)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Foundry.CompileCommands(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Foundry.CompileCommandsClass

classmethod new(file)
Parameters:

file (Gio.File) – a [iface`Gio`.File] to load

Returns:

a [class`Dex`.Future] that resolves to a [class`Foundry`.CompileCommands] or rejects with error.

Return type:

Dex.Future

Creates a new Foundry.CompileCommands object containing the parsed values from a compile_commands.json file.

lookup(file, system_includes)
Parameters:
  • file (Gio.File) – a Gio.File representing the file to lookup

  • system_includes (str) – system include dirs if any

Raises:

GLib.Error

Returns:

A string array or None if there was a failure to locate or parse the command.

directory:

A location for a Gio.File, or None

Return type:

([str] or None, directory: Gio.File)

Locates the commands to compile the file requested.

If directory is non-None, then the directory to run the command from is placed in directory.