module battery.policy.arg

Companion module to battery.policy.cmd.

Code Map

//! Companion module to battery.policy.cmd.
module battery.policy.arg;


//! Class for argument processing.
class Arg
{
public:
	enum Kind
	{
		Directory,
		Exe,
		Lib,
		Name,
		Dep,
		SrcDir,
		TestFile,
		Command,
		WarningsEnabled,
		Library,
		LibraryPath,
		Framework,
		FrameworkPath,
		StringPath,
		IsTheRT,
		ScanForD,
		Identifier,
		Output,
		JSONOutput,
		FileC,
		FileD,
		FileS,
		FileObj,
		FileAsm,
		FileVolt,
		ArgLD,
		ArgCC,
		ArgLink,
		ArgLinker,
		Env,
		BootEnv,
		HostEnv,
		ToolCmd,
		ToolArg,
		BootToolCmd,
		BootToolArg,
		HostToolCmd,
		HostToolArg,
	}


public:
	//! Always set, often the original param.
	flag: string;
	//! Extra option to the flag.
	extra: string;
	condArch: i32;
	condPlatform: i32;
	kind: Kind;


public:
	this(kind: Kind, flag: string) { }
	this(kind: Kind, flag: string, extra: string) { }
}

fn filterArgs(args: Arg[], arch: Arch, platform: Platform) { }
class Arg

Class for argument processing.

flag: string

Always set, often the original param.

extra: string

Extra option to the flag.