|
From: | Xavier Romeuf |
Subject: | [Gnucap-devel] Gnucap commands and their interface |
Date: | Thu, 03 May 2007 14:57:45 +0200 |
User-agent: | Thunderbird 2.0.0.0 (X11/20070326) |
Hi Al,I am still working on the Python wrapper for Gnucap, but I am facing a problem in finding the available commands. As you said in http://article.gmane.org/gmane.comp.gnu.gnucap.devel/307, you don't know which commands were installed before starting Gnucap.
However, they could be found by asking the dispatcher which of them are currently installed, once Gnucap is started. Would you mind adding some members to the DISPATCHER class which return the mapped commands (DISPATCHER::begin() and DISPATCHER::end() for instance)?
Another improvement of the commands could be a descriptor: how about adding to each class derived from CMD a member function which tells what it does? A possible way would be to return a simple string describing the command and its parameters, or, even better, a map, each value of which would be the description of a parameter.
Thus, each command would be smartly defined: its implementation (CMD_XXX::do_it()) and its interface (CMD_XXX::get_description()). It may also be interesting for a future "help" command.
Regards, Xavier
[Prev in Thread] | Current Thread | [Next in Thread] |