This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: Prototypes of C++ methods
- To: docbook at lists dot oasis-open dot org
- Subject: Re: DOCBOOK: Prototypes of C++ methods
- From: Norman Walsh <ndw at nwalsh dot com>
- Date: Wed, 22 Mar 2000 05:47:49 -0500
- References: <Pine.LNX.4.10.10003210924550.23072-100000@infa.abo.fi>
- Reply-To: docbook at lists dot oasis-open dot org
/ Jan Ekholm <chakie@infa.abo.fi> was heard to say:
| <funcsynopsis>
| <funcsynopsisinfo>#include <ZombieClient.h></funcsynopsisinfo>
| <funcdef>Packet * <function>receive</function></funcdef>
| <paramdef>
| const bool <parameter>Block = false</parameter>
| </paramdef>
| </funcsynopsis>
|
| This corresponds to a method definition of:
|
| Packet * receive (const bool Block = false);
|
| But how do I get an extra 'const' in there? Like this?
|
| Packet * receive (const bool Block = false) const;
|
| I haven't found any way of doing it. Can it be done, or have I just
| misunderstood something? I hope this kind of question is relevant for this
| list, otherwise I apologize.
It's definitely relevant. The new ClassSynopsis stuff in DocBook
V4.0 is intended to provide better support for object oriented
languages, but this appears to just be a function (as opposed to
a method) with additional modifiers. I don't think we've covered
that case yet.
Refresh my C++ :-), what does the trailing const mean in this case?
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | [They] say the Earth is flat, but
http://www.oasis-open.org/docbook/ | I know that it is round, for I
Chair, DocBook Technical Committee | have seen the shadow on the moon,
| and I have more faith in a shadow
| than in [them].--Ferdinand Magellan