[Kst] branches/work/kst/pluginify/kst/src/libkstmath
Adam Treat
treat at kde.org
Mon Sep 18 17:53:14 CEST 2006
SVN commit 586061 by treat:
* Update ouput vectors/scalars after plugin algorithm
* Style fixes
M +30 -12 kstbasicplugin.cpp
--- branches/work/kst/pluginify/kst/src/libkstmath/kstbasicplugin.cpp #586060:586061
@@ -118,6 +118,30 @@
//Perform any necessary operations on the outputs
+ //output vectors...
+ QStringList ov = outputVectors();
+ QStringList::ConstIterator ovI = ov.begin();
+ for (; ovI != ov.end(); ++ovI) {
+ if (KstVectorPtr o = outputVector(*ovI)) {
+ vectorRealloced(o, o->value(), o->length());
+ o->setDirty();
+ o->setNewAndShift(o->length(), o->numShift());
+ o->update(updateCounter);
+ }
+ }
+
+ //output scalars...
+ QStringList os = outputScalars();
+ QStringList::ConstIterator osI = os.begin();
+ for (; osI != os.end(); ++osI) {
+ if (KstScalarPtr o = outputScalar(*osI)) {
+ o->update(updateCounter);
+ }
+ }
+
+ //ouput strings...
+ //TODO
+
return setLastUpdateResult(depUpdated ? UPDATE : NO_CHANGE);
}
@@ -205,8 +229,7 @@
//First, check the inputVectors...
QStringList iv = inputVectors();
QStringList::ConstIterator ivI = iv.begin();
- for (; ivI != iv.end(); ++ivI)
- {
+ for (; ivI != iv.end(); ++ivI) {
if (!inputVector(*ivI))
return false;
}
@@ -214,8 +237,7 @@
//Now, check the inputScalars...
QStringList is = inputScalars();
QStringList::ConstIterator isI = is.begin();
- for (; isI != is.end(); ++isI)
- {
+ for (; isI != is.end(); ++isI) {
if (!inputScalar(*isI))
return false;
}
@@ -223,8 +245,7 @@
//Finally, check the inputStrings...
QStringList istr = inputStrings();
QStringList::ConstIterator istrI = istr.begin();
- for (; istrI != istr.end(); ++istrI)
- {
+ for (; istrI != istr.end(); ++istrI) {
if (!inputString(*istrI))
return false;
}
@@ -238,8 +259,7 @@
//First, update the inputVectors...
QStringList iv = inputVectors();
QStringList::ConstIterator ivI = iv.begin();
- for (; ivI != iv.end(); ++ivI)
- {
+ for (; ivI != iv.end(); ++ivI) {
depUpdated =
UPDATE == inputVector(*ivI)->update(updateCounter) || depUpdated;
}
@@ -247,8 +267,7 @@
//Now, update the inputScalars...
QStringList is = inputScalars();
QStringList::ConstIterator isI = is.begin();
- for (; isI != is.end(); ++isI)
- {
+ for (; isI != is.end(); ++isI) {
depUpdated =
UPDATE == inputScalar(*isI)->update(updateCounter) || depUpdated;
}
@@ -256,8 +275,7 @@
//Finally, update the inputStrings...
QStringList istr = inputStrings();
QStringList::ConstIterator istrI = istr.begin();
- for (; istrI != istr.end(); ++istrI)
- {
+ for (; istrI != istr.end(); ++istrI) {
depUpdated =
UPDATE == inputString(*istrI)->update(updateCounter) || depUpdated;
}
More information about the Kst
mailing list