David Farnham on Tue, 29 Jun 1999 15:32:10 -0700
Hi Tom,
First of all, thanks for taking over the PERCEPS
package. It is the most powerful & flexible C++
documentation generator that I have found. It's
nice to know that development will continue. Now
on to business...
The BUG:
--------
There appears to be a bug in the PERCEPS package
when it comes to merging member functions.
Specifically, when a method appears as 'typed' in
a class definition (i.e. parsed by the PROCCLASS
"Match Typed Member Functions" section) but
subsequently appears 'untyped' in a source file
(parsed by the PROCFUNC "Match Untyped Functions"
section) the two functions are not properly
merged. For example:
class A
{
public:
explicit A(); // Looks like a typed method
};
A::A() // looks like an untyped function
{};
When the $membername variable for the typed method
is created:
$membername="$temp2($fid) $temp4"
we get something like: "A() " <- notice the
trailing space.
However, the name for the method in the method
definition appears as:
$gfunc="$temp1($fid)"
which after stripping off the leading "A::"
becomes: "A()" <- no trailing space.
As a result of the missing trailing space, PERCEPS
doesn't realize that these are the same method.
A Fix:
------
There are two obvious ways to fix this:
1) remove the trailing space for typed
methods/functions (when the method isn't 'const').
2) Add a space to the end of the untyped
methods/functions.
#2 seems to be the path of least resistance, so if
one simply changes (in perceps.pl v3.5.0):
2108c2108
< $membername="$temp1($fid) ";
---
> $membername="$temp1($fid)";
2298c2298
< $gfunc="$temp1($fid) ";
---
> $gfunc="$temp1($fid)";
then the problem no longer occurs.
Well, thanks for your help!
- Dave