Parsing DEPRECATED_MSG_ATTRIBUTE in Objective C
Will Palmer <[email protected]> Wed, 19 Jan 2022 11:34:13 +0000
| Newsgroups | gmane.text.doxygen.general |
|---|---|
| Message-ID | <[email protected]> |
--===============6826808916694094048==
Content-Type: multipart/alternative;
boundary="Apple-Mail=_4926336D-A011-4011-946D-598347EF9692"
--Apple-Mail=_4926336D-A011-4011-946D-598347EF9692
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
I define a property in an ObjC class using DEPRECATED_MSG_ATTRIBUTE to =
output a warning when building against the API:
** Defines the type of the object
* @return The object type as a string
* @deprecated Will be removed in v3.4.0
*/
@property (nullable, readonly) NSString *type =
DEPRECATED_MSG_ATTRIBUTE("Use property: instead");
Doxygen 1.9.2 parses this block and creates html (including the =
deprecated comment), but thinks this is a method rather than a property:
<>Instance Methods
(NSString *type) - DEPRECATED_MSG_ATTRIBUTE =
<file:///Users/will/Documents/development/SDK/apple/admanagement/YOAdManag=
ement/dist/Documentation/html/interface_y_o_ad_break.html#ae461161d33e9768=
6512fade8dccd7135>
...=20
=E2=97=86=C2=A0 =
<file:///Users/will/Documents/development/SDK/apple/admanagement/YOAdManag=
ement/dist/Documentation/html/interface_y_o_ad_break.html#ae461161d33e9768=
6512fade8dccd7135>DEPRECATED_MSG_ATTRIBUTE
- (NSString *type) DEPRECATED_MSG_ATTRIBUTE (=E2=80=9CUse =
property: instead") =09
Defines the type of the object=20
Returns
The object type as a string=20
Deprecated: =
<file:///Users/will/Documents/development/SDK/apple/admanagement/YOAdManag=
ement/dist/Documentation/html/deprecated.html#_deprecated000001>
Will be removed in v3.4.0
Is there something I am missing?
I see that it has been used successfully in another project:
=
https://app.mapsindoors.com/mapsindoors/reference/ios/v3/_m_p_location_8h_=
source.html =
<https://app.mapsindoors.com/mapsindoors/reference/ios/v3/_m_p_location_8h=
_source.html>
output
=
https://app.mapsindoors.com/mapsindoors/reference/ios/v3/interface_m_p_loc=
ation.html#a740623ead5e934170dea0765804c410f =
<https://app.mapsindoors.com/mapsindoors/reference/ios/v3/interface_m_p_lo=
cation.html#a740623ead5e934170dea0765804c410f>
but I=E2=80=99m not sure how (unless the author temporarily removed the =
macro in the header before parsing with Doxygen.
Any help gratefully accepted!=
--Apple-Mail=_4926336D-A011-4011-946D-598347EF9692
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">I =
define a property in an ObjC class using <span style=3D"caret-color: =
rgb(100, 56, 32); color: rgb(100, 56, 32); font-family: Menlo; =
font-size: 11px; background-color: rgb(230, 230, 230);" =
class=3D"">DEPRECATED_MSG_ATTRIBUTE</span> to output a warning when =
building against the API:<div class=3D""><br class=3D""></div><div =
class=3D""><div style=3D"margin: 0px; font-stretch: normal; font-size: =
11px; line-height: normal; font-family: Menlo; color: rgb(17, 128, 64); =
background-color: rgb(230, 230, 230);" class=3D""><span style=3D"color: =
rgba(17, 128, 64, 0.35)" class=3D"">**</span><span style=3D"color: =
rgba(0, 0, 0, 0.85)" class=3D""> </span>Defines the type of the =
object</div><div style=3D"margin: 0px; font-stretch: normal; font-size: =
11px; line-height: normal; font-family: Menlo; color: rgb(17, 128, 64); =
background-color: rgb(230, 230, 230);" class=3D""><span style=3D"color: =
rgba(17, 128, 64, 0.35)" class=3D""> *</span><span style=3D"color: =
rgba(0, 0, 0, 0.85)" class=3D""> </span><b class=3D"">@return </b>The =
object type as a string</div><div style=3D"margin: 0px; font-stretch: =
normal; font-size: 11px; line-height: normal; font-family: Menlo; color: =
rgb(17, 128, 64); background-color: rgb(230, 230, 230);" class=3D""><span =
style=3D"color: rgba(17, 128, 64, 0.35)" class=3D""> *</span><span =
style=3D"color: rgba(0, 0, 0, 0.85)" class=3D""> </span><b =
class=3D"">@deprecated </b>Will be removed in v3.4.0</div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo; color: rgba(17, 128, 64, 0.35); =
background-color: rgb(230, 230, 230);" class=3D""> */</div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo; color: rgb(155, 35, 147); =
background-color: rgb(230, 230, 230);" class=3D""><b =
class=3D"">@property</b><span style=3D"color: rgba(0, 0, 0, 0.85)" =
class=3D""> (</span><b class=3D"">nullable</b><span style=3D"color: =
rgba(0, 0, 0, 0.85)" class=3D"">, </span><b class=3D"">readonly</b><span =
style=3D"color: rgba(0, 0, 0, 0.85)" class=3D"">) </span><span =
style=3D"color: #400080" class=3D"">NSString</span><span style=3D"color: =
rgba(0, 0, 0, 0.85)" class=3D""> *</span><span style=3D"color: #0f68a0" =
class=3D"">type</span><span style=3D"color: rgba(0, 0, 0, 0.85)" =
class=3D""> </span><span style=3D"color: #643820" =
class=3D"">DEPRECATED_MSG_ATTRIBUTE</span><span style=3D"color: rgba(0, =
0, 0, 0.85)" class=3D"">(</span><span style=3D"color: #c41a16" =
class=3D"">"Use property: instead"</span><span style=3D"color: rgba(0, =
0, 0, 0.85)" class=3D"">);</span></div></div><div class=3D""><span =
style=3D"color: rgba(0, 0, 0, 0.85)" class=3D""><br =
class=3D""></span></div><div class=3D""><span style=3D"color: rgba(0, 0, =
0, 0.85);" class=3D"">Doxygen 1.9.2 parses this block and creates html =
(including the </span><span style=3D"caret-color: rgba(0, 0, 0, =
0.85); color: rgba(0, 0, 0, 0.85);" class=3D"">deprecated</span><span =
style=3D"color: rgba(0, 0, 0, 0.85);" class=3D""> comment), but =
thinks this is a method rather than a property:</span></div><div =
class=3D""><span style=3D"color: rgba(0, 0, 0, 0.85)" class=3D""><br =
class=3D""></span></div><div class=3D""><table class=3D"memberdecls" =
style=3D"font-stretch: normal; font-size: 14px; line-height: 22px; =
font-family: "Open Sans", "Open Sans", sans-serif; =
border-color: rgb(230, 230, 230); border-spacing: 0px; padding: 0px; =
color: rgb(0, 0, 0);"><tbody class=3D""><tr class=3D"heading"><td =
colspan=3D"2" style=3D"vertical-align: top; padding: 0px; font-size: =
0.9em; transition-property: background-color, box-shadow; =
transition-duration: 0.5s;" class=3D""><h2 class=3D"groupheader" =
style=3D"transition: text-shadow 0.5s linear; margin-right: 15px; =
font-family: Helvetica; font-weight: normal; line-height: 1.1; color: =
rgb(232, 65, 123); border-bottom-width: 1px; border-bottom-style: solid; =
border-bottom-color: rgb(230, 230, 230); font-size: =
18.899999618530273px; margin-top: 12px; padding-top: 8px; =
padding-bottom: 4px; width: 1631px; margin-bottom: 4px;"><a =
id=3D"pub-methods" name=3D"pub-methods" style=3D"color: rgb(232, 65, =
123);" class=3D""></a>Instance Methods</h2></td></tr><tr =
class=3D"memitem:ae461161d33e97686512fade8dccd7135"><td =
class=3D"memItemLeft" align=3D"right" valign=3D"top" =
style=3D"vertical-align: top; padding: 1px 0px 0px 8px; font-size: =
0.9em; background-color: rgb(255, 255, 255); border: none; margin: 4px; =
white-space: nowrap; transition-property: background-color, box-shadow; =
transition-duration: 0.5s;">(NSString *type) </td><td =
class=3D"memItemRight" valign=3D"bottom" style=3D"vertical-align: top; =
padding: 1px 0px 0px 8px; font-size: 0.9em; background-color: rgb(255, =
255, 255); border: none; margin: 4px; width: 1414.140625px; =
transition-property: background-color, box-shadow; transition-duration: =
0.5s;">- <a class=3D"el" =
href=3D"file:///Users/will/Documents/development/SDK/apple/admanagement/YO=
AdManagement/dist/Documentation/html/interface_y_o_ad_break.html#ae461161d=
33e97686512fade8dccd7135" style=3D"color: rgb(232, 65, 123); =
font-weight: bold; text-decoration: =
none;">DEPRECATED_MSG_ATTRIBUTE</a></td></tr></tbody></table><div =
class=3D""><br class=3D""></div></div><div class=3D"">... </div><div =
class=3D""><br class=3D""></div><div class=3D""><h2 class=3D"memtitle" =
style=3D"transition: text-shadow 0.5s linear; margin-right: 15px; =
font-weight: 300; line-height: 1.25; color: rgb(232, 65, 123); padding: =
8px; border-top-width: 1px; border-top-style: solid; border-top-color: =
rgb(255, 255, 255); border-left-width: 1px; border-left-style: solid; =
border-left-color: rgb(255, 255, 255); border-right-width: 1px; =
border-right-style: solid; border-right-color: rgb(255, 255, 255); =
border-top-right-radius: 4px; border-top-left-radius: 4px; =
margin-bottom: -1px; background-image: none; background-color: rgb(230, =
230, 230); float: left; background-repeat: repeat no-repeat;"><span =
class=3D"permalink" style=3D"font-size: 13.649999618530273px; display: =
inline-block; vertical-align: middle;"><a =
href=3D"file:///Users/will/Documents/development/SDK/apple/admanagement/YO=
AdManagement/dist/Documentation/html/interface_y_o_ad_break.html#ae461161d=
33e97686512fade8dccd7135" style=3D"color: rgb(232, 65, 123); =
text-decoration: none;" =
class=3D"">=E2=97=86 </a></span>DEPRECATED_MSG_ATTRIBUTE</h2><div =
class=3D"memitem" style=3D"font-stretch: normal; font-size: 14px; =
line-height: 22px; font-family: "Open Sans", "Open =
Sans", sans-serif; padding: 0px; margin-bottom: 10px; margin-right: =
5px; transition: box-shadow 0.5s linear; width: 1631px; display: table =
!important;"><div class=3D"memproto" style=3D"font-weight: bold; =
font-stretch: normal; line-height: 22px; border-top-width: 1px; =
border-top-style: solid; border-top-color: rgb(255, 255, 255); =
border-left-width: 1px; border-left-style: solid; border-left-color: =
rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid; =
border-right-color: rgb(255, 255, 255); padding: 6px 0px; color: =
rgb(232, 65, 123); text-shadow: rgba(255, 255, 255, 0.9) 0px 1px 1px; =
background-color: rgb(230, 230, 230); box-shadow: rgba(0, 0, 0, 0.15) =
5px 5px 5px; -webkit-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; =
border-top-right-radius: 4px;"><table class=3D"memname" =
style=3D"font-stretch: normal; font-size: 14px; line-height: 22px; =
border-color: rgb(230, 230, 230); margin-left: 6px;"><tbody class=3D""><tr=
class=3D""><td class=3D"memname" style=3D"vertical-align: bottom; =
padding: 0px; font-size: 0.9em; margin-left: 6px;">- (NSString *type) =
DEPRECATED_MSG_ATTRIBUTE </td><td style=3D"vertical-align: bottom; =
padding: 0px; font-size: 0.9em;" class=3D""></td><td class=3D"paramtype" =
style=3D"vertical-align: bottom; padding: 0px; font-size: 0.9em; =
white-space: =
nowrap;">(=E2=80=9CUse property: instead") </td><td =
class=3D"paramname" style=3D"vertical-align: bottom; padding: 0px; =
font-size: 0.9em; color: rgb(96, 32, 32); white-space: nowrap;"></td><td =
style=3D"vertical-align: bottom; padding: 0px; font-size: 0.9em;" =
class=3D""></td></tr></tbody></table></div><div class=3D"memdoc" =
style=3D"font-stretch: normal; line-height: 22px; border-width: 0px 1px =
1px; border-bottom-style: solid; border-bottom-color: rgb(230, 230, =
230); border-left-style: solid; border-left-color: rgb(230, 230, 230); =
border-right-style: solid; border-right-color: rgb(230, 230, 230); =
padding: 6px 10px 2px; background-image: =
url("applewebdata://144AF06E-2E40-4F9F-A6CC-95F47FF4B99D/nav_g.png&qu=
ot;); background-color: rgb(255, 255, 255); box-shadow: rgba(0, 0, 0, =
0.15) 5px 5px 5px; border-bottom-left-radius: 4px; =
border-bottom-right-radius: 4px; -webkit-box-shadow: rgba(0, 0, 0, 0.15) =
5px 5px 5px; background-repeat: repeat no-repeat;"><p =
style=3D"font-stretch: normal; line-height: 22px;" class=3D"">Defines =
the type of the object </p><dl class=3D"section return" =
style=3D"font-stretch: normal; line-height: 22px; padding: 0px; =
margin-left: 0px;"><dt style=3D"font-weight: bold;" =
class=3D"">Returns</dt><dd style=3D"margin-bottom: 6px;" class=3D"">The =
object type as a string </dd></dl><dl class=3D"deprecated" =
style=3D"font-stretch: normal; line-height: 22px; padding: 0px 0px 0px =
3px; margin-left: -7px; border-left-width: 4px; border-left-style: =
solid; border-color: rgb(80, 80, 80);"><dt style=3D"font-weight: bold;" =
class=3D""><b class=3D""><a class=3D"el" =
href=3D"file:///Users/will/Documents/development/SDK/apple/admanagement/YO=
AdManagement/dist/Documentation/html/deprecated.html#_deprecated000001" =
style=3D"color: rgb(232, 65, 123); text-decoration: =
none;">Deprecated:</a></b></dt><dd class=3D"">Will be removed in =
v3.4.0</dd></dl></div></div><div class=3D""><br =
class=3D""></div></div><div class=3D""><br class=3D""></div><div =
class=3D""><span style=3D"color: rgba(0, 0, 0, 0.85)" class=3D"">Is =
there something I am missing?</span></div><div class=3D""><span =
style=3D"color: rgba(0, 0, 0, 0.85)" class=3D""><br =
class=3D""></span></div><div class=3D""><span style=3D"color: rgba(0, 0, =
0, 0.85)" class=3D"">I see that it has been used successfully in another =
project:</span></div><div class=3D""><span style=3D"color: rgba(0, 0, 0, =
0.85)" class=3D""><br class=3D""></span></div><div class=3D""><span =
style=3D"caret-color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);" =
class=3D""><a =
href=3D"https://app.mapsindoors.com/mapsindoors/reference/ios/v3/_m_p_loca=
tion_8h_source.html" =
class=3D"">https://app.mapsindoors.com/mapsindoors/reference/ios/v3/_m_p_l=
ocation_8h_source.html</a></span></div><div class=3D""><span =
style=3D"caret-color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);" =
class=3D""><br class=3D""></span></div><div class=3D""><span =
style=3D"caret-color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);" =
class=3D"">output</span></div><div class=3D""><span style=3D"caret-color: =
rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);" class=3D""><br =
class=3D""></span></div><div class=3D""><span style=3D"caret-color: =
rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);" class=3D""><a =
href=3D"https://app.mapsindoors.com/mapsindoors/reference/ios/v3/interface=
_m_p_location.html#a740623ead5e934170dea0765804c410f" =
class=3D"">https://app.mapsindoors.com/mapsindoors/reference/ios/v3/interf=
ace_m_p_location.html#a740623ead5e934170dea0765804c410f</a></span></div><d=
iv class=3D""><span style=3D"caret-color: rgba(0, 0, 0, 0.85); color: =
rgba(0, 0, 0, 0.85);" class=3D""><br class=3D""></span></div><div =
class=3D""><span style=3D"caret-color: rgba(0, 0, 0, 0.85); color: =
rgba(0, 0, 0, 0.85);" class=3D"">but I=E2=80=99m not sure how (unless =
the author temporarily removed the macro in the header before =
parsing with Doxygen.</span></div><div class=3D""><span =
style=3D"caret-color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);" =
class=3D""><br class=3D""></span></div><div class=3D""><span =
style=3D"caret-color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);" =
class=3D"">Any help gratefully accepted!</span></div></body></html>=
--Apple-Mail=_4926336D-A011-4011-946D-598347EF9692--
--===============6826808916694094048==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============6826808916694094048==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Doxygen-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
--===============6826808916694094048==--