PTLib
Version 2.10.4
|
This class is an enhancement to PArgList to add context. More...
#include <cli.h>
Public Member Functions | |
Construction | |
Arguments (Context &context, const PString &rawLine) | |
Operations | |
Context & | WriteUsage () |
Write to the CLI output channel the usage for the current command. | |
Context & | WriteError (const PString &error=PString::Empty()) |
Write an error to the CLI output channel. | |
Member access | |
Context & | GetContext () const |
Get the CLI context supplying the command line arguments. | |
Protected Attributes | |
Context & | m_context |
PString | m_command |
PString | m_usage |
This class is an enhancement to PArgList to add context.
PCLI::Arguments::Arguments | ( | Context & | context, |
const PString & | rawLine | ||
) |
Context& PCLI::Arguments::GetContext | ( | ) | const [inline] |
Get the CLI context supplying the command line arguments.
References m_context.
Context& PCLI::Arguments::WriteError | ( | const PString & | error = PString::Empty() | ) |
Write an error to the CLI output channel.
error | Error message |
Write to the CLI output channel the usage for the current command.
PString PCLI::Arguments::m_command [protected] |
Context& PCLI::Arguments::m_context [protected] |
Referenced by GetContext().
PString PCLI::Arguments::m_usage [protected] |