Foundry.Command

g Foundry.Command Foundry.Command Foundry.Contextual Foundry.Contextual Foundry.Contextual->Foundry.Command GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

GObject.ObjectClass (5)

class

new (context)

can_default ()

dup_argv ()

dup_cwd ()

dup_environ ()

dup_id ()

dup_name ()

get_locality ()

prepare (pipeline, launcher, phase)

set_argv (argv)

set_cwd (cwd)

set_environ (environ)

set_id (id)

set_locality (locality)

set_name (id)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

do_can_default ()

do_prepare (pipeline, launcher, phase)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

argv

[str]

r/w/en

cwd

str

r/w/en

environ

[str]

r/w/en

id

str

r/w/en

locality

Foundry.CommandLocality

r/w/en

name

str

r/w/en

provider

Foundry.CommandProvider

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Foundry.Contextual

r

Class Details

class Foundry.Command(**kwargs)
Bases:

Foundry.Contextual

Abstract:

No

Structure:

Foundry.CommandClass

A command that may be run in a shell environment.

classmethod new(context)
Parameters:

context (Foundry.Context) –

Return type:

Foundry.Command

can_default()
Returns:

True if self can be the default command

priority:

a location for the priority, or None

Return type:

(bool, priority: int)

Checks to see if self is suitable to be run as the default command when running a project. The priority indicates if it should take priority over other commands which can be default. The highest priority value wins.

dup_argv()
Returns:

a string array of arguments for the command to run.

Return type:

[str] or None

dup_cwd()
Return type:

str

dup_environ()
Returns:

a string array containing the environment of None.

Return type:

[str] or None

dup_id()
Return type:

str

dup_name()
Return type:

str

get_locality()
Return type:

Foundry.CommandLocality

prepare(pipeline, launcher, phase)
Parameters:
Returns:

a [class`Dex`.Future] that resolves to any value when the preparation has completed. Otherwise rejects with error.

Return type:

Dex.Future

Prepares launcher to run self.

If pipeline is set, the command may use that to run the command within a particular environment based on the locality settings.

set_argv(argv)
Parameters:

argv (str) –

set_cwd(cwd)
Parameters:

cwd (str) –

set_environ(environ)
Parameters:

environ (str) –

set_id(id)
Parameters:

id (str) –

set_locality(locality)
Parameters:

locality (Foundry.CommandLocality) –

set_name(id)
Parameters:

id (str) –

do_can_default() virtual
Returns:

True if self can be the default command

priority:

a location for the priority, or None

Return type:

(bool, priority: int)

Checks to see if self is suitable to be run as the default command when running a project. The priority indicates if it should take priority over other commands which can be default. The highest priority value wins.

do_prepare(pipeline, launcher, phase) virtual
Parameters:
Returns:

a [class`Dex`.Future] that resolves to any value when the preparation has completed. Otherwise rejects with error.

Return type:

Dex.Future

Prepares launcher to run self.

If pipeline is set, the command may use that to run the command within a particular environment based on the locality settings.

Property Details

Foundry.Command.props.argv
Name:

argv

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Foundry.Command.props.cwd
Name:

cwd

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Foundry.Command.props.environ
Name:

environ

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Foundry.Command.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Foundry.Command.props.locality
Name:

locality

Type:

Foundry.CommandLocality

Default Value:

Foundry.CommandLocality.PIPELINE

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Foundry.Command.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Foundry.Command.props.provider
Name:

provider

Type:

Foundry.CommandProvider

Default Value:

None

Flags:

READABLE