- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 Atomineer 9.00 格式化我的代码注释,但我很难确定返回类型是否为 const
。 documentation说明对于 MethodReturns,使用 %type%
将提供完整的返回类型(给出的示例是:const int*
):
MethodReturns
Rules used to generate the description for the return values for methods (VB functions). The following special variables can be used in this section:
%type% The return type for the method (const int*)
%typeBase% The return type for the method, not including any modifiers (int)
但是,当我使用 %type%
时,它忽略了 const
。来自 MethodReturns.xml 的示例:
<Set desc="zzz A %type%" />
将为该方法生成以下内容:
//! \brief Performs the action.
//! \return zzz an int.
int PerformAction();
//! \brief Performs the different action.
//! \return zzz an int.
const int PerformDifferentAction();
//! \brief Practise action.
//! \return zzz A std::string&
std::string& PractiseAction();
//! \brief Attempt action.
//! \return zzz A std::string&
const std::string& AttemptAction();
struct Success;
//! \brief Performs the action with tips action.
//! \return zzz A success*.
Success* PerformActionWithTips();
//! \brief Succeed at action.
//! \return zzz An int*.
const int* SucceedAtAction();
我已经尝试了所有其他变体:%typeBase
(来自 MethodReturns.xml)甚至 %retTypeBase%
、%retType%
, %typeBase%
和 %specialType%
(在记录 Methods.xml 中的方法时在确定返回类型时提到了这些)但是这些都不包括 const
.
我还尝试了其他几种类型(double
、std::string
和自定义 struct
),所以它不仅仅是int
.
从上面的例子可以看出,我已经验证了我设置的描述确实是被调用的描述。
此外,这似乎完全适用于 Parameters.xml(确定参数类型是否为 const
);但是,它似乎在 Methods.xml 中不起作用(其中 %retType%
可用于通过修饰符确定返回类型)
如何确定方法是否返回 const
?
最佳答案
这显然是 Atomineer 中的一个错误,并且在最新版本 (9.21.3.1510) 中仍然可以重现。正如在他们的规则和模板文档中所写的那样,MethodReturns.xml
中的 %type%
变量应该始终解析为完整类型(也包括 const-modifier)。那里的例子
%type% The return type for the method
(const int*)
甚至使用了 const 修饰符并且应该解析为 (const int*)
- 但不是。默认的 MethodReturns.xml
没有任何修改,问题仍然存在(即使使用了 %retType%
,这根本不包含在 文档中 -但无论如何它的行为都是一样的:文档中没有显示 const 修饰符)。
我建议通过他们网站上的电子邮件 (support@atomineerutils.com) 联系 Atomineer Pro 文档的支持,并向他们报告此问题。
关于c++ - Atomineer:确定返回类型是否为const,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30448380/
我正在使用 Selenium Web 驱动程序 3.0,并且想要从打开的两个对话框(一个在后台,第二个在前台)的 Activity 对话框中单击“确定”按钮。如何从 html 下面的父 div 单击前
actions: [ FlatButton( onPressed: () {
我有一个问题有点超出我的范围(我真的很高兴我是 Beta)涉及重复项(所以 GROUP BY, HAVING, COUNT),通过将解决方案保留在 SQLite 附带的标准函数中而变得更加复杂。我正在
使用DBI是否可以确定SELECT语句的已执行语句句柄是否返回任何行而不从中获取行? IE。就像是: use DBI; ... my $sth = $dbh->prepare("SELECT ..."
是否可以为“确定”和“关闭”按钮指定回调函数? 如果是JQuery Modal,则可以在初始化时使用按钮字典指定回调函数。 Semantic-ui模态是否提供类似的功能?按下确定后,我该如何寻求其他逻
我想阅读警报中的消息。 示例:如果警报显示“错误的电子邮件地址”。怎么读呢?意味着我想将该消息存储在字符串中。 如何在“警报”中单击“确定”...?? 如何使用 Selenium 来做到这一点? 最佳
我有一个删除按钮: 我试图首先查明是否已选择一个网站,如果已选择一个网站,我需要确定是否已选择一个或多个列表项,如果是,则继续删除这些项目。 我的 if 语句不断返回“您必须首先选择您的列表”,即使它
部分出于好奇——我们想知道在我们的应用程序中发生了什么——部分是因为我们需要在我们的代码中找到一些潜在的问题,我喜欢在我们的网络应用程序运行时跟踪一些一般值。这尤其包括某些对象图的分配内存。 我们的应
我将 SweetAlert 与 Symfony 结合使用,我希望用户在完成删除操作之前进行确认。 发生的情况是,当用户单击删除按钮时,SweetAlert 会弹出,然后立即消失,并且该项目被删除。 在
我们有一个应用程序可以生成不包括字母 O 的随机基数 35 [0-9A-Z]。我正在寻找一种解决方案来查找包含任何淫秽英语单词的代码,而无需搜索包含 10,000 个条目的列表每个生成的代码。每秒生成
这是我做的: #include #include int betweenArray(int a, int b){ int *arr,i,range; range = b - a +
我知道如何创建 警报和确认框,但我不知道如何做的是实际单击“确定”。我有一个弹出确认框的页面。 我想使用 Java Script 插件单击“确定”。基本上,我希望我的代码单击页面上的链接,然后在出现提
代码: swal('Your ORDER has been placed Successfully!!!'); window.location="index.php"; 甜蜜警报工
>>> import re >>> s = "These are the words in a sentence" >>> regex = re.compile('are|words') >>> [m
使用确定的理想散列函数给出随机期望线性时间算法两个数组 A[1..n] 和 B[1..n] 是否不相交,即 A 的元素是否也是 B 的元素。 谁能告诉我如何做到这一点,甚至如何开始考虑它? 最佳答案
我在计算机科学课上有这段代码: int input=15; while (input < n ) { input = input *3;} 这段代码有 log3(n/15) 次循环的上限。我们怎样才能
我有一个允许 2 位玩家玩 TicTacToe 的程序。在每个玩家移动之后,它应该在那个点显示棋盘并返回一个名为 Status 的枚举,显示玩家是否应该继续,如果玩家赢了,还是平局。但是,该算法要么返
给定一个 y 值数组,例如 [-3400, -1000, 500, 1200, 3790],我如何确定“好的”Y 轴标签并将它们放置在网格上? ^ ---(6,000)-|---
假设我有一个检查用户登录的 SQL 语句: SELECT * FROM users WHERE username='test@example.com', password='abc123', expi
teradata中有返回表中哪一列被定义为主索引的命令吗?我没有制作一些我正在处理的表,也没有尝试优化我对这些表的连接。谢谢! 最佳答案 有dbc.IndicesV,其中IndexNumber=1表示
我是一名优秀的程序员,十分优秀!