- Implemented CmdHelp object that replaces the report.cpp longUsage
  function, and builds the output dynamically from other Command
  objects.  This is also why the help text right now is very short,
  as only a few commands are migrated.
- Obsoleted longUsage function.
- Updated task.1 man page with 'execute' command details.
- Modified command.lua sample to include command usage.
- Removed "help" from old Context::dispatch, which means "help" is
  the first migrated command.
- Added usage and description to all Cmd* objects.
- Implemented Command::usage and Command::description as base class
  methods that simply return data that is specified by the derived
  classes.
This commit is contained in:
Paul Beckingham 2011-05-15 01:14:13 -04:00
parent afc97d566c
commit bc756637da
15 changed files with 477 additions and 91 deletions

View file

@ -40,14 +40,18 @@ public:
static Command* factory (const std::string&);
std::string usage () const;
std::string description () const;
bool read_only () const;
bool displays_id () const;
virtual bool implements (const std::string&) = 0;
virtual int execute (const std::string&, std::string&) = 0;
protected:
bool _read_only;
bool _displays_id;
std::string _usage;
std::string _description;
bool _read_only;
bool _displays_id;
};
#endif