flags module

class flags.Flag(name, descriptions=[], isBool=False, min=0, max=100, default_bool=False, default_value=50)

ベースクラス: object

各フラグの詳細を扱うクラス

name

フラグのキー

Type

str

descriptions

説明文の配列。1要素毎に改行して出力される。

Type

list of str

isBool

オンオフを切り替えるタイプならTrue。範囲を指定するタイプならFalse

Type

bool, default False

min

範囲を指定するフラグの最小値

Type

int, default 0

max

範囲を指定するフラグの最大値

Type

int, default 100

flag

isBoolがTrueの時の値

Type

bool, default False

value

isBoolがFalseの時の値

Type

int, default 50

default_bool

self._flagの初期値

Type

bool, default False

default_value

self._valueの初期値

Type

int, default 50

property default_bool: bool
property default_value: int
property descriptions: list
property flag: bool
property isBool: bool
property max: int
property min: int
property name: str
property value: int
class flags.Flags

ベースクラス: object

フラグに関するクラス

params

フラグで使う文字をキーとする辞書

Type

dict or Flag

add(flag: flags.Flag)

扱うフラグの種類を追加する。

パラメータ

flag (Flag) -- 扱うフラグのパラメータ

getDetail() str

各フラグの詳細を結合した文字列を返す。

戻り値

description

戻り値の型

str

property params: dict
parse(value: str)

フラグ文字列をパースして、各フラグの値を更新する。

パラメータ

value (str) -- フラグ文字列。B50、g-5B30、eg+5B70Aなどのように、与えられる。