QString idsStr = eltCat.attribute("ids","none");
if (idsStr == "none") throw (Exception(BLOCKFILE_CORRUPTED));
- QStringList listCat = idsStr.split(",");
- foreach(QString str, listCat)
- {
- int idCat = str.toInt(&ok);
- categories.append(idCat);
+ if (idsStr.isEmpty()) {
+ categories.append(99);
+ }
+ else {
+ QStringList listCat = idsStr.split(",");
+ foreach(QString str, listCat)
+ {
+ int idCat = str.toInt(&ok);
+ categories.append(idCat);
+ }
}
// getting description
ReferenceInterface *iface = (ReferenceInterface *)(b.inputs.at(i));
if (iface->getPurpose() == AbstractInterface::Control) {
toWrite << iface->getName();
+ toWrite << iface->getType();
toWrite << iface->getWidth();
toWrite << iface->getPurpose();
toWrite << iface->getDirection();
ReferenceInterface *iface = (ReferenceInterface *)(b.inputs.at(i));
if (iface->getPurpose() != AbstractInterface::Control) {
toWrite << iface->getName();
+ toWrite << iface->getType();
toWrite << iface->getWidth();
toWrite << iface->getPurpose();
toWrite << iface->getDirection();
ReferenceInterface *iface = (ReferenceInterface *)(b.outputs.at(i));
if (iface->getPurpose() == AbstractInterface::Control) {
toWrite << iface->getName();
+ toWrite << iface->getType();
toWrite << iface->getWidth();
toWrite << iface->getPurpose();
toWrite << iface->getDirection();
ReferenceInterface *iface = (ReferenceInterface *)(b.outputs.at(i));
if (iface->getPurpose() != AbstractInterface::Control) {
toWrite << iface->getName();
+ toWrite << iface->getType();
toWrite << iface->getWidth();
toWrite << iface->getPurpose();
toWrite << iface->getDirection();
for(int i=0; i<b.bidirs.size(); i++){
ReferenceInterface *iface = (ReferenceInterface *)(b.bidirs.at(i));
toWrite << iface->getName();
+ toWrite << iface->getType();
toWrite << iface->getWidth();
toWrite << iface->getPurpose();
toWrite << iface->getDirection();
iface = new ReferenceInterface(&b);
in >> txt;
iface->setName(txt);
+ int type;
+ in >> type;
+ iface->setType(type);
in >> txt;
iface->setWidth(txt);
in >> val;
iface = new ReferenceInterface(&b);
in >> txt;
iface->setName(txt);
+ int type;
+ in >> type;
+ iface->setType(type);
in >> txt;
iface->setWidth(txt);
in >> val;
iface = new ReferenceInterface(&b);
in >> txt;
iface->setName(txt);
+ int type;
+ in >> type;
+ iface->setType(type);
in >> txt;
iface->setWidth(txt);
in >> val;
// does strictly nothing
throw(Exception(INVALID_REFBLOCK_USE));
}
+
+void ReferenceBlock::computeAdmittanceDelays() throw(Exception) {
+ // does strictly nothing
+ throw(Exception(INVALID_REFBLOCK_USE));
+}