本文整理汇总了C++中Dsymbol::addComment方法的典型用法代码示例。如果您正苦于以下问题:C++ Dsymbol::addComment方法的具体用法?C++ Dsymbol::addComment怎么用?C++ Dsymbol::addComment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dsymbol
的用法示例。
在下文中一共展示了Dsymbol::addComment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addComment
void ConditionalDeclaration::addComment(const utf8_t *comment)
{
/* Because addComment is called by the parser, if we called
* include() it would define a version before it was used.
* But it's no problem to drill down to both decl and elsedecl,
* so that's the workaround.
*/
if (comment)
{
Dsymbols *d = decl;
for (int j = 0; j < 2; j++)
{
if (d)
{
for (size_t i = 0; i < d->dim; i++)
{ Dsymbol *s = (*d)[i];
//printf("ConditionalDeclaration::addComment %s\n", s->toChars());
s->addComment(comment);
}
}
d = elsedecl;
}
}
}
示例2: addComment
void AttribDeclaration::addComment(unsigned char *comment)
{
if (comment)
{
Array *d = include(NULL, NULL);
if (d)
{
for (unsigned i = 0; i < d->dim; i++)
{ Dsymbol *s = (Dsymbol *)d->data[i];
//printf("AttribDeclaration::addComment %s\n", s->toChars());
s->addComment(comment);
}
}
}
}