This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Prototypes of C++ methods


/ Jan Ekholm <chakie@infa.abo.fi> was heard to say:
| <funcsynopsis>
| <funcsynopsisinfo>#include &lt;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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]