wavelength 1.0.0
Loading...
Searching...
No Matches
stringoption.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/debug.h"
4#include "os/option.h"
5#include "os/string.h"
6
12class StringOption : public Option {
13public:
22 StringOption(const char *pszName, String *pTarget);
23
31 void Parse(int *pnIndex) override;
32
39 void PrintUsage() const override {
40 DebugPrint("\t-%s <string>\n", mName);
41 }
42
43private:
44 String *mTarget;
45};
const char * mName
Definition option.h:50
Option(const char *pszName)
Construct an option of a name.
StringOption(const char *pszName, String *pTarget)
Construct an option of a name.
void PrintUsage() const override
Print the name of the option and its argument.
Definition stringoption.h:39
void Parse(int *pnIndex) override
Copy the next argument into the string.
Growable text buffer that is also a PrnStream.
Definition string.h:19
void DebugPrint(const char *pszFormat,...)
Format a diagnostic message that the shipped build discards.