Hi,
there seems to be an issue with the documentation of protected and private members.
While what you document for a member in the interface section is correctly assigned in the output, everything written for those members in the implementation section is assigned to the last public member documented.
For public members I could not find that problem.
I have a test file with output, that shows that, but no way of posting it. If someone is interested I would send it (by mail or whatever).
Otherwise I see a lot of improvement. Thank you for the great work guys!
JD
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The truth is, the first procedure implementation in the file confuses pas2dox and the conversion stops. That's why everything after that get's ignored.
{* This implementation does absolute nothing.
*
* \param parameter1 : integer - A unneeded parameter.
*}
procedure Test1.ProcedureI2(
parameter1 : integer
);
begin
end;
pas2dox --->
/** This implementation just returns 'Test'.
*
* \return : string - The string 'Test'.
**/
So, I found out, that the problem is caused by empty bodies:
begin
end;
Doesn't matter if private or public or function or peocedure.
Right after scanning the begin correctly:
<Body,Func_Body>(^begin|{S}*begin|^asm|{S}asm){S} {
OutputLogNum("// Got Begin - ", g_nBegins);
if (!g_bComments)
{
OutputLog("// Not a comment");
g_nBegins++;
if (g_nBegins > 1)
{
if (g_bConvertBody)
{
fprintf(OUTPUT, "{");
}
else
{
fprintf(OUTPUT, "begin");
}
}
else
{
fprintf(OUTPUT, "{");
if (!g_bKeepBody)
{
fprintf(OUTPUT, "\n#ifndef DOXYGEN_SKIP\n");
}
}
}
g_bFuncBody = true;
BEGIN(Func_Body);
}
is called again (looks like begin is still in the buffer), so g_nBegins get increased to 2. The end only decreases it by 1 to 1. So the rest of the text is handled as it would be body intern code.
Maybe it doesn't take someone of the gurus not to long to fix this, otherwise the work around is not to have empty bodies (what's the use anyway?) or ignore the problem while still developing you application, not having all bodies filled, yet.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
there seems to be an issue with the documentation of protected and private members.
While what you document for a member in the interface section is correctly assigned in the output, everything written for those members in the implementation section is assigned to the last public member documented.
For public members I could not find that problem.
I have a test file with output, that shows that, but no way of posting it. If someone is interested I would send it (by mail or whatever).
Otherwise I see a lot of improvement. Thank you for the great work guys!
JD
Further investigation on that:
It seems that those methods are not converted correctly.
While for public members the output is, e.g.:
string Test1::FunctionI1 ()
{
#ifndef DOXYGEN_SKIP
result := 'Test';
#endif /* DOXYGEN_SKIP */
};
as it would be expected, for private or protected methods it still says:
function Test1.PrivateStuff(
parameter1 : string;
parameter2 : string
) : string;begin result := 'Test';end
JD
Sorry,
forget this!
The truth is, the first procedure implementation in the file confuses pas2dox and the conversion stops. That's why everything after that get's ignored.
{* This implementation does absolute nothing.
*
* \param parameter1 : integer - A unneeded parameter.
*}
procedure Test1.ProcedureI2(
parameter1 : integer
);
begin
end;
pas2dox --->
/** This implementation just returns 'Test'.
*
* \return : string - The string 'Test'.
**/
string Test1::FunctionI1 ()
{
#ifndef DOXYGEN_SKIP
result := 'Test';
#endif /* DOXYGEN_SKIP */
};
/** This implementation does absolute nothing.
*
* \param parameter1 : integer - A unneeded parameter.
**/
Test1::ProcedureI2 (integer parameter1
)
{
#ifndef DOXYGEN_SKIP
end;
// =================
// protected methods
// =================
/** \return : string - The value of _member.
**/
function Test1.GetMember : string;begin result := _member;end
procedure Test1.SetMember(
newValue : string
);begin _member := newValue;end
So, I found out, that the problem is caused by empty bodies:
begin
end;
Doesn't matter if private or public or function or peocedure.
Right after scanning the begin correctly:
<Body,Func_Body>(^begin|{S}*begin|^asm|{S}asm){S} {
OutputLogNum("// Got Begin - ", g_nBegins);
if (!g_bComments)
{
OutputLog("// Not a comment");
g_nBegins++;
if (g_nBegins > 1)
{
if (g_bConvertBody)
{
fprintf(OUTPUT, "{");
}
else
{
fprintf(OUTPUT, "begin");
}
}
else
{
fprintf(OUTPUT, "{");
if (!g_bKeepBody)
{
fprintf(OUTPUT, "\n#ifndef DOXYGEN_SKIP\n");
}
}
}
g_bFuncBody = true;
BEGIN(Func_Body);
}
is called again (looks like begin is still in the buffer), so g_nBegins get increased to 2. The end only decreases it by 1 to 1. So the rest of the text is handled as it would be body intern code.
Maybe it doesn't take someone of the gurus not to long to fix this, otherwise the work around is not to have empty bodies (what's the use anyway?) or ignore the problem while still developing you application, not having all bodies filled, yet.
I have checked a new version of pas2dox.l into CVS. Let me know how you get on with this.
Works fine with me now. Thank you!