[
https://issues.apache.org/jira/browse/THRIFT-2341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13888415#comment-13888415
]
Jens Geyer commented on THRIFT-2341:
------------------------------------
The featurecan be enabled by means of {{-gen delphi:xmldoc}}. Extra switch
because XMLDoc needs some additional steps and settings to be done within a
Delphi application to take effect, therefore it is more of an additional
feature, rather than a standard one.
The patch [^THRIFT-2341_delphi-xmldoc-comments.patch] implements also a fix for
a endless loop in {{t_generator::generate_docstring_comment()}}. The problem
happens in an edge case that I ran into: When the last call to getline()
extracted exactly the last bufsize bytes from the stream, the fail() bit is set
on the next call, instead of eof(). At least that is what happened and how I
understand [this
comment|http://www.cplusplus.com/reference/istream/istream/getline/]:
{quote}
The failbit flag is set if the function extracts no characters, or if the
delimiting character is not found once (n-1) characters have already been
written to s. Note that if the character that follows those (n-1) characters in
the input sequence is precisely the delimiting character, it is also extracted
and the failbit flag is not set (the extracted sequence was exactly n
characters long).
{quote}
After adding the failbit check the issue was gone.
> Enable generation of Delphi XMLDoc comments (a.k.a. "Help Insight")
> -------------------------------------------------------------------
>
> Key: THRIFT-2341
> URL: https://issues.apache.org/jira/browse/THRIFT-2341
> Project: Thrift
> Issue Type: Improvement
> Components: Delphi - Compiler
> Reporter: Jens Geyer
> Assignee: Jens Geyer
> Labels: docstrings
> Fix For: 0.9.2
>
> Attachments: THRIFT-2341_delphi-xmldoc-comments.patch
>
>
> Implement generation of
> [XMLDoc|http://docwiki.embarcadero.com/RADStudio/XE5/en/Help_Insight]
> comments similar to C#.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)