Re: Fwd: Gnucap Comprehensive Help System Implementation Details

Felix Salfelder <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
On Wed, Jun 04, 2014 at 11:21:59AM +0200, Rishabh Yadav wrote:

> 1.User should have the source file of a plugin to get the help manual of
> that plugin.

no. just store the extra/extended manual in texinfo format, then look it
up there. e.g. (after installation) from
/usr/share/gnucap/doc/texinfo.whatever. don't access the C++ source code
at runtime. 

something like this might make sense. (similar for other base classes).

COMPONENT::help(cmd) {
	print synopsis (device name, ports etc.);
	if cmd.umatch("extended"){ // or any other keyword?
		if (lookup texinfo){
			print it.
		} else {
			print no extended manual available
		}
	} else {
		if (lookup texinfo){
			tell user how to get it.
		} else {
			print no help avaiable
		}
	}
}

(custom plugins that are not part of gnucap should carry their full
documentation, and so do not fallback to a texinfo manual).

hth
felix
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.