categories.append(id);
}
-void ReferenceBlock::setBriefDescription(const QString& str) {
+void ReferenceBlock::setDescription(const QString& str) {
if(str != NULL)
- descriptionBrief = str;
-}
-
-void ReferenceBlock::setDetailedDescription(const QString& str) {
- if(str != NULL)
- descriptionDetail = str;
+ description = str;
}
void ReferenceBlock::addImplementation(BlockImplementation *impl) {
// getting description
cout << "Block info : get description" << endl;
QDomElement eltDesc = eltCat.nextSiblingElement("description");
- // getting brief
- QDomElement eltBrief = eltDesc.firstChildElement("brief");
- QDomNode nodeBriefTxt = eltBrief.firstChild();
- if (nodeBriefTxt.isNull()) {
- descriptionBrief = "no brief description";
- }
- else {
- QDomText txtBrief = nodeBriefTxt.toText();
- descriptionBrief = txtBrief.data().trimmed();
- cout << "block brief desc : " << qPrintable(descriptionBrief) << endl;
- }
- // getting detailed
- QDomElement eltDetail = eltBrief.nextSiblingElement("detailed");
- QDomNode nodeDetailTxt = eltDetail.firstChild();
- if (nodeDetailTxt.isNull()) {
- descriptionDetail = "no detailed description";
+ // getting text
+ QDomNode nodeTxt = eltDesc.firstChild();
+ if (nodeTxt.isNull()) {
+ description = "no description";
}
else {
- QDomText txtDetail = nodeDetailTxt.toText();
- descriptionDetail = txtDetail.data().trimmed();
- cout << "block detail desc : " << qPrintable(descriptionDetail) << endl;
- }
+ QDomText txtBrief = nodeTxt.toText();
+ description = txtBrief.data().trimmed();
+ cout << "block desc : " << qPrintable(description) << endl;
+ }
}
void ReferenceBlock::loadParameters(QDomElement &elt) throw(Exception) {
toWrite << b.name;
toWrite << b.xmlFile;
- toWrite << b.descriptionBrief;
- toWrite << b.descriptionDetail;
+ toWrite << b.description;
toWrite << b.categories;
toWrite << b.hashMd5;
toWrite << b.params.size();
toWrite << iface->getDirection();
toWrite << iface->getMultiplicity();
toWrite << iface->getClockIfaceType();
- toWrite << iface->getClockIface();
+ toWrite << iface->getClockIfaceString();
}
}
// secondly write control ifaces
toWrite << iface->getDirection();
toWrite << iface->getMultiplicity();
toWrite << iface->getClockIfaceType();
- toWrite << iface->getClockIface();
+ toWrite << iface->getClockIfaceString();
}
}
// secondly, write other ifaces
toWrite << iface->getDirection();
toWrite << iface->getMultiplicity();
toWrite << iface->getClockIfaceType();
- toWrite << iface->getClockIface();
+ toWrite << iface->getClockIfaceString();
}
}
toWrite << b.outputs.size();
toWrite << iface->getDirection();
toWrite << iface->getMultiplicity();
toWrite << iface->getClockIfaceType();
- toWrite << iface->getClockIface();
+ toWrite << iface->getClockIfaceString();
}
}
// secondly, write other ifaces
toWrite << iface->getDirection();
toWrite << iface->getMultiplicity();
toWrite << iface->getClockIfaceType();
- toWrite << iface->getClockIface();
+ toWrite << iface->getClockIfaceString();
}
}
toWrite << b.bidirs.size();
toWrite << iface->getDirection();
toWrite << iface->getMultiplicity();
toWrite << iface->getClockIfaceType();
- toWrite << iface->getClockIface();
+ toWrite << iface->getClockIfaceString();
}
out << blockData;
in >> b.name;
in >> b.xmlFile;
- in >> b.descriptionBrief;
- in >> b.descriptionDetail;
+ in >> b.description;
in >> b.categories;
in >> b.hashMd5;
b.params.clear();