本文整理汇总了C++中DocNode::kind方法的典型用法代码示例。如果您正苦于以下问题:C++ DocNode::kind方法的具体用法?C++ DocNode::kind怎么用?C++ DocNode::kind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocNode
的用法示例。
在下文中一共展示了DocNode::kind方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: visitPre
void DocbookDocVisitor::visitPre(DocParamList *pl)
{
if (m_hide) return;
QListIterator<DocNode> li(pl->parameters());
DocNode *param;
m_t << " <row>" << endl;
if (!li.toFirst())
{
m_t << " <entry></entry>" << endl;
}
else
{
m_t << " <entry>";
int cnt = 0;
for (li.toFirst();(param=li.current());++li)
{
if (cnt)
{
m_t << ", ";
}
if (param->kind()==DocNode::Kind_Word)
{
visit((DocWord*)param);
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)param);
}
cnt++;
}
m_t << "</entry>" << endl;
}
m_t << " <entry>";
}
示例2: visitPre
void RTFDocVisitor::visitPre(DocParamList *pl)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamList)}\n");
// Put in the direction: in/out/in,out if specified.
if (pl->direction()!=DocParamSect::Unspecified)
{
m_t << "[";
if (pl->direction()==DocParamSect::In)
{
m_t << "in";
}
else if (pl->direction()==DocParamSect::Out)
{
m_t << "out";
}
else if (pl->direction()==DocParamSect::InOut)
{
m_t << "in,out";
}
m_t << "] ";
}
m_t << "{\\i ";
//QStrListIterator li(pl->parameters());
//const char *s;
QListIterator<DocNode> li(pl->parameters());
DocNode *param;
bool first=TRUE;
for (li.toFirst();(param=li.current());++li)
{
if (!first) m_t << ","; else first=FALSE;
if (param->kind()==DocNode::Kind_Word)
{
visit((DocWord*)param);
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)param);
}
}
m_t << "} ";
m_lastIsPara=TRUE;
}
示例3: visitPre
void XmlDocVisitor::visitPre(DocParamList *pl)
{
if (m_hide) return;
m_t << "<parameteritem>" << endl;
m_t << "<parameternamelist>" << endl;
//QStrListIterator li(pl->parameters());
//const char *s;
QListIterator<DocNode> li(pl->parameters());
DocNode *param;
for (li.toFirst();(param=li.current());++li)
{
m_t << "<parametername";
if (pl->direction()!=DocParamSect::Unspecified)
{
m_t << " direction=\"";
if (pl->direction()==DocParamSect::In)
{
m_t << "in";
}
else if (pl->direction()==DocParamSect::Out)
{
m_t << "out";
}
else if (pl->direction()==DocParamSect::InOut)
{
m_t << "inout";
}
m_t << "\"";
}
m_t << ">";
if (param->kind()==DocNode::Kind_Word)
{
visit((DocWord*)param);
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)param);
}
m_t << "</parametername>" << endl;
}
m_t << "</parameternamelist>" << endl;
m_t << "<parameterdescription>" << endl;
}
示例4: visitPre
void LatexDocVisitor::visitPre(DocParamList *pl)
{
if (m_hide) return;
m_t << "\\item[";
if (pl->direction()!=DocParamSect::Unspecified)
{
m_t << "\\mbox{";
if (pl->direction()==DocParamSect::In)
{
m_t << "$\\leftarrow$";
}
else if (pl->direction()==DocParamSect::Out)
{
m_t << "$\\rightarrow$";
}
else if (pl->direction()==DocParamSect::InOut)
{
m_t << "$\\leftrightarrow$";
}
m_t << "} ";
}
m_t << "{\\em ";
//QStrListIterator li(pl->parameters());
//const char *s;
QListIterator<DocNode> li(pl->parameters());
DocNode *param;
bool first=TRUE;
for (li.toFirst();(param=li.current());++li)
{
if (!first) m_t << ","; else first=FALSE;
m_insideItem=TRUE;
if (param->kind()==DocNode::Kind_Word)
{
visit((DocWord*)param);
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)param);
}
m_insideItem=FALSE;
}
m_t << "}]";
}
示例5: visitPre
void ManDocVisitor::visitPre(DocParamList *pl)
{
if (m_hide) return;
m_t << "\\fI";
//QStrListIterator li(pl->parameters());
//const char *s;
QListIterator<DocNode> li(pl->parameters());
DocNode *param;
bool first=TRUE;
for (li.toFirst();(param=li.current());++li)
{
if (!first) m_t << ","; else first=FALSE;
if (param->kind()==DocNode::Kind_Word)
{
visit((DocWord*)param);
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)param);
}
}
m_t << "\\fP ";
}
示例6: visitPre
void RTFDocVisitor::visitPre(DocParamList *pl)
{
static int columnPos[4][5] =
{ { 2, 25, 100, 100, 100 }, // no inout, no type
{ 3, 14, 35, 100, 100 }, // inout, no type
{ 3, 25, 50, 100, 100 }, // no inout, type
{ 4, 14, 35, 55, 100 }, // inout, type
};
int config=0;
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamList)}\n");
DocParamSect::Type parentType = DocParamSect::Unknown;
DocParamSect *sect = 0;
if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
{
parentType = ((DocParamSect*)pl->parent())->type();
sect=(DocParamSect*)pl->parent();
}
bool useTable = parentType==DocParamSect::Param ||
parentType==DocParamSect::RetVal ||
parentType==DocParamSect::Exception ||
parentType==DocParamSect::TemplateParam;
if (sect && sect->hasInOutSpecifier()) config+=1;
if (sect && sect->hasTypeSpecifier()) config+=2;
if (useTable)
{
int i;
m_t << "\\trowd \\trgaph108\\trleft426\\tblind426"
"\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< endl;
for (i=0;i<columnPos[config][0];i++)
{
m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
"\\cltxlrtb "
"\\cellx" << (rtf_pageWidth*columnPos[config][i+1]/100) << endl;
}
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
}
if (sect && sect->hasInOutSpecifier())
{
if (useTable)
{
m_t << "{";
}
// Put in the direction: in/out/in,out if specified.
if (pl->direction()!=DocParamSect::Unspecified)
{
if (pl->direction()==DocParamSect::In)
{
m_t << "in";
}
else if (pl->direction()==DocParamSect::Out)
{
m_t << "out";
}
else if (pl->direction()==DocParamSect::InOut)
{
m_t << "in,out";
}
}
if (useTable)
{
m_t << "\\cell }";
}
}
if (sect && sect->hasTypeSpecifier())
{
if (useTable)
{
m_t << "{";
}
QListIterator<DocNode> li(pl->paramTypes());
DocNode *type;
bool first=TRUE;
for (li.toFirst();(type=li.current());++li)
{
if (!first) m_t << " | "; else first=FALSE;
if (type->kind()==DocNode::Kind_Word)
{
visit((DocWord*)type);
}
else if (type->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)type);
}
}
if (useTable)
{
//.........这里部分代码省略.........