本文整理汇总了C++中FLFieldMetaData::associatedFieldName方法的典型用法代码示例。如果您正苦于以下问题:C++ FLFieldMetaData::associatedFieldName方法的具体用法?C++ FLFieldMetaData::associatedFieldName怎么用?C++ FLFieldMetaData::associatedFieldName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FLFieldMetaData
的用法示例。
在下文中一共展示了FLFieldMetaData::associatedFieldName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
FLTableMetaData *FLManager::metadata(QDomElement *mtd, bool quick)
{
if (!mtd)
return 0;
QString name, a, q;
bool v = true, ed = true, cw = true, dl = false;
QDomNode no = mtd->firstChild();
while (!no.isNull()) {
QDomElement e = no.toElement();
if (!e.isNull()) {
if (e.tagName() == "field") {
no = no.nextSibling();
continue;
}
if (e.tagName() == "name") {
name = e.text();
no = no.nextSibling();
continue;
}
if (e.tagName() == "query") {
q = e.text();
no = no.nextSibling();
continue;
}
if (e.tagName() == "alias") {
a = e.text().mid(30, e.text().length() - 32);
a = FLUtil::translate("MetaData", a);
no = no.nextSibling();
continue;
}
if (e.tagName() == "visible") {
v = (e.text() == "true");
no = no.nextSibling();
continue;
}
if (e.tagName() == "editable") {
ed = (e.text() == "true");
no = no.nextSibling();
continue;
}
if (e.tagName() == "concurWarn") {
cw = (e.text() == "true");
no = no.nextSibling();
continue;
}
if (e.tagName() == "detectLocks") {
dl = (e.text() == "true");
no = no.nextSibling();
continue;
}
}
no = no.nextSibling();
}
FLTableMetaData *tmd = new FLTableMetaData(name, a, q);
FLCompoundKey *cK = 0;
QStringList assocs;
tmd->setConcurWarn(cw);
tmd->setDetectLocks(dl);
no = mtd->firstChild();
while (!no.isNull()) {
QDomElement e = no.toElement();
if (!e.isNull()) {
if (e.tagName() == "field") {
FLFieldMetaData *f = metadataField(&e, v, ed);
if (!tmd)
tmd = new FLTableMetaData(name, a, q);
tmd->addFieldMD(f);
if (f->isCompoundKey()) {
if (!cK)
cK = new FLCompoundKey();
cK->addFieldMD(f);
}
if (!f->associatedFieldName().isEmpty()) {
assocs.append(f->associatedFieldName());
assocs.append(f->associatedFieldFilterTo());
assocs.append(f->name());
}
no = no.nextSibling();
continue;
}
}
no = no.nextSibling();
}
tmd->setCompoundKey(cK);
QString aWith, aBy;
for (QStringList::Iterator it = assocs.begin(); it != assocs.end(); ++it) {
aWith = (*it);
++it;
aBy = (*it);
++it;
tmd->field((*it))->setAssociatedField(tmd->field(aWith), aBy);
}
//.........这里部分代码省略.........