[Kst] branches/work/kst/hierarchy/kst/src

Eli Fidler eli at staikos.net
Thu Nov 30 19:58:38 CET 2006


SVN commit 609426 by fidler:

set _type properly

fix locking in KstEventMonitorEntry on added input Scalars.... there are
probably more fixes necessary for _vectorsUsed

use KstObjectTag::fromString() for DataObject tags


 M  +8 -1      libkstapp/ksteventmonitorentry.cpp  
 M  +2 -1      libkstmath/kstcsd.cpp  
 M  +1 -1      libkstmath/kstequation.cpp  
 M  +1 -1      libkstmath/ksthistogram.cpp  
 M  +4 -0      libkstmath/kstimage.cpp  
 M  +1 -1      libkstmath/kstplugin.cpp  
 M  +1 -1      libkstmath/kstpsd.cpp  
 M  +1 -1      libkstmath/kstvcurve.cpp  


--- branches/work/kst/hierarchy/kst/src/libkstapp/ksteventmonitorentry.cpp #609425:609426
@@ -106,7 +106,8 @@
   _pExpression = 0L;
 
   _typeString = i18n("Event");
-  KstObject::setTagName(KstObjectTag(in_tag, KstObjectTag::globalTagContext)); // FIXME: tag context
+  _type = "Event";
+  KstObject::setTagName(KstObjectTag::fromString(in_tag));
 
   KstVectorPtr xv = new KstVector(KstObjectTag("x", tag()), NS, this);
   _xVector = _outputVectors.insert(OUTXVECTOR, xv);
@@ -129,6 +130,12 @@
       KstStringMap stm;
       _pExpression->collectObjects(_vectorsUsed, _inputScalars, stm);
 
+      for (KstScalarMap::ConstIterator i = _inputScalars.begin(); i != _inputScalars.end(); ++i) {
+        if (!(*i)->isLockedByMe()) {
+          (*i)->readLock();
+        }
+      }
+
       _isValid = true;
     } else {
       delete (Equation::Node*)ParsedEquation;
--- branches/work/kst/hierarchy/kst/src/libkstmath/kstcsd.cpp #609425:609426
@@ -118,8 +118,9 @@
                                double in_gaussianSigma, const QString& in_vectorUnits, 
                                const QString& in_rateUnits, PSDType in_outputType, const QString& vecName) {
   _typeString = i18n("Cumulative Spectral Decay");
+  _type = "Cumulative Spectral Decay";
   _inputVectors[INVECTOR] = in_V;
-  setTagName(KstObjectTag(in_tag, KstObjectTag::globalTagContext));  // FIXME: CSDs are not always top-level?
+  setTagName(KstObjectTag::fromString(in_tag));
   _frequency = in_freq;
   _average = in_average;
   _apodize = in_apodize;
--- branches/work/kst/hierarchy/kst/src/libkstmath/kstequation.cpp #609425:609426
@@ -148,7 +148,7 @@
   _pe = 0L;
   _typeString = i18n("Equation");
   _type = "Equation";
-  KstObject::setTagName(KstObjectTag(in_tag, KstObjectTag::globalTagContext)); // FIXME: global tag context?
+  KstObject::setTagName(KstObjectTag::fromString(in_tag));
 
   KstVectorPtr xv = new KstVector(KstObjectTag("xsv", tag()), 2, this);
   _xOutVector = _outputVectors.insert(XOUTVECTOR, xv);
--- branches/work/kst/hierarchy/kst/src/libkstmath/ksthistogram.cpp #609425:609426
@@ -107,7 +107,7 @@
   _Bins = 0L;
   _NBins = 0;
   
-  setTagName(KstObjectTag(in_tag, KstObjectTag::globalTagContext));  // FIXME: always top-level?
+  setTagName(KstObjectTag::fromString(in_tag));
   _inputVectors[RAWVECTOR] = in_V;
 
   if (xmax_in>xmin_in) {
--- branches/work/kst/hierarchy/kst/src/libkstmath/kstimage.cpp #609425:609426
@@ -77,6 +77,7 @@
 
   setTagName(KstObjectTag::fromString(in_tag));
   _typeString = i18n("Image");
+  _type = "Image";
   _hasColorMap = in_hasColorMap;
   _hasContourMap = in_hasContourMap;
   _zLower = in_zLower;
@@ -110,6 +111,7 @@
   _inputMatrices[THEMATRIX] = in_matrix;
   setTagName(KstObjectTag(in_tag, KstObjectTag::globalTagContext));  // FIXME: always top-level?
   _typeString = i18n("Image");
+  _type = "Image";
   _zLower = lowerZ;
   _zUpper = upperZ;
   _autoThreshold = autoThreshold;
@@ -127,6 +129,7 @@
   _inputMatrices[THEMATRIX] = in_matrix;
   setTagName(KstObjectTag(in_tag, KstObjectTag::globalTagContext));  // FIXME: always top-level?
   _typeString = i18n("Image");
+  _type = "Image";
   _contourColor = contourColor;
   _numContourLines = numContours;
   _contourWeight = contourWeight;
@@ -152,6 +155,7 @@
   _inputMatrices[THEMATRIX] = in_matrix;
   setTagName(KstObjectTag(in_tag, KstObjectTag::globalTagContext));  // FIXME: always top-level?
   _typeString = i18n("Image");
+  _type = "Image";
   _contourColor = contourColor;
   _numContourLines = numContours;
   _contourWeight = contourWeight;
--- branches/work/kst/hierarchy/kst/src/libkstmath/kstplugin.cpp #609425:609426
@@ -697,7 +697,7 @@
   
   // set the same plugin
   plugin->setPlugin(_plugin);
-  plugin->setTagName(KstObjectTag(tag().tag() + "'", tag().context()));
+  plugin->setTagName(KstObjectTag(tag().tag() + "'", tag().context())); // FIXME: unique tag generation method
   duplicatedMap.insert(this, KstDataObjectPtr(plugin));  
   return KstDataObjectPtr(plugin);
 }
--- branches/work/kst/hierarchy/kst/src/libkstmath/kstpsd.cpp #609425:609426
@@ -139,7 +139,7 @@
   if (in_V) {
     _inputVectors[INVECTOR] = in_V;
   }
-  setTagName(KstObjectTag(in_tag, KstObjectTag::globalTagContext));  // FIXME: PSDs are not always top-level?
+  setTagName(KstObjectTag::fromString(in_tag));
   _Freq = in_freq;
   _Average = in_average;
   _Apodize = in_apodize;
--- branches/work/kst/hierarchy/kst/src/libkstmath/kstvcurve.cpp #609425:609426
@@ -194,7 +194,7 @@
   _typeString = i18n("Curve");
   _type = "Curve";
   Color = in_color;
-  setTagName(KstObjectTag(in_tag, KstObjectTag::globalTagContext));  // FIXME: curves are not always top-level?
+  setTagName(KstObjectTag::fromString(in_tag));
   updateParsedLegendTag();
 }
 


More information about the Kst mailing list