本文整理汇总了C++中BrowserNodeList::at方法的典型用法代码示例。如果您正苦于以下问题:C++ BrowserNodeList::at方法的具体用法?C++ BrowserNodeList::at怎么用?C++ BrowserNodeList::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrowserNodeList
的用法示例。
在下文中一共展示了BrowserNodeList::at方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: send_uml_def
void ClassData::send_uml_def(ToolCom * com, BrowserNode * bn,
const QString & comment)
{
int api = com->api_format(true);
BasicData::send_uml_def(com, bn, comment);
com->write_bool(FALSE); // class member
if (api >= 13)
com->write_bool(FALSE); // volatile
com->write_char(((api >= 23) ||
(uml_visibility != UmlPackageVisibility))
? uml_visibility : UmlPublic);
if (api >= 30)
com->write_string(constraint);
com->write_bool(is_abstract);
if (stereotype == "typedef") {
BrowserNodeList inh;
browser_node->children(inh, UmlGeneralisation, UmlRealize);
if (inh.count() != 0)
// first inheritance is taken in all cases
((RelationData *) inh.at(0)->get_data())->get_end_class()->write_id(com);
else if (base_type.type != 0)
base_type.type->write_id(com);
else if (!base_type.explicit_type.isEmpty()) {
com->write_id(0);
com->write_string(base_type.explicit_type);
}
else {
// no base_type, try with a dependency
browser_node->children(inh, UmlDependency);
if (inh.count() != 0)
((RelationData *) inh.at(0)->get_data())->get_end_class()->write_id(com);
else {
com->write_id(0);
com->write_string("");
}
}
}
if (api >= 48)
com->write_bool(is_active);
}
示例2: type
QString type(const QString & t, const QStringList & types,
BrowserNodeList & nodes)
{
int rank = types.findIndex(t);
return (rank != -1)
? QString(((BrowserClass *) nodes.at(rank))->get_name())
: t;
}
示例3: the_type
AType the_type(const QString & t, const QStringList & types,
BrowserNodeList & nodes)
{
AType result;
int rank = types.findIndex(t);
if (rank != -1)
result.type = ((BrowserClass *) nodes.at(rank));
else
result.explicit_type = t;
return result;
}
示例4: set_type
void AttributeData::set_type(const QString &value)
{
QStringList list;
BrowserNodeList nodes;
BrowserClass::instances(nodes);
nodes.full_names(list);
AType t;
if (!value.isEmpty())
{
int rank = list.indexOf(value);
if (rank != -1)
t.type = (BrowserClass *) nodes.at(rank);
else
t.explicit_type = value;
}
set_type(t);
}
示例5: enter_child_name
bool BrowserNode::enter_child_name(QString & r, const QString & msg, UmlCode type,
BrowserNodeList & nodes,
BrowserNode ** old, bool allow_spaces,
bool allow_empty, bool existing) {
if (existing && nodes.isEmpty()) {
msg_warning(TR("Error"), TR("nothing available"));
return FALSE;
}
QStringList list;
nodes.full_names(list);
list.prepend(QString::null);
*old = 0;
for (;;) {
BooL ok = FALSE;
r = (list.count() == 1)
? MyInputDialog::getText("Uml", msg, QString::null, ok)
: MyInputDialog::getText("Uml", msg, list, QString::null, existing, ok);
if (! ok)
return FALSE;
if (!r.isEmpty()) {
int index = list.findIndex(r);
if (index != -1) {
*old = nodes.at(index - 1);
return TRUE;
}
}
if (wrong_child_name(r, type, allow_spaces, allow_empty))
msg_critical(TR("Error"), r + "\n\n" + TR("illegal name or already used"));
else
return TRUE;
}
}