wavelength 1.0.0
Loading...
Searching...
No Matches
booloption.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/debug.h"
4#include "os/option.h"
5
11class BoolOption : public Option {
12public:
19 ~BoolOption() override = default;
20
30 BoolOption(const char *pszName, int *pnTarget, int nValue);
31
39 void Parse(int *pnIndex) override;
40
47 void PrintUsage() const override {
48 DebugPrint("\t-%s\n", mName);
49 }
50
51private:
52 int *mTarget;
53 int mValue;
54};
BoolOption(const char *pszName, int *pnTarget, int nValue)
Construct an option of a name.
void PrintUsage() const override
Print the name of the option.
Definition booloption.h:47
~BoolOption() override=default
Destroy the object.
void Parse(int *pnIndex) override
Store the value.
const char * mName
Definition option.h:50
Option(const char *pszName)
Construct an option of a name.
void DebugPrint(const char *pszFormat,...)
Format a diagnostic message that the shipped build discards.