Debugger: Add CliCommand::PrintUsage()
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
#include "CliCommand.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
CliCommand::CliCommand(const char* summary, const char* usage)
|
||||
:
|
||||
@@ -18,3 +20,12 @@ CliCommand::CliCommand(const char* summary, const char* usage)
|
||||
CliCommand::~CliCommand()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CliCommand::PrintUsage(const char* commandName) const
|
||||
{
|
||||
printf("Usage: ");
|
||||
printf(Usage(), commandName);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ public:
|
||||
const char* Summary() const { return fSummary; }
|
||||
const char* Usage() const { return fUsage; }
|
||||
|
||||
void PrintUsage(const char* commandName) const;
|
||||
|
||||
virtual void Execute(int argc, const char* const* argv,
|
||||
CliContext& context) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user