[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Thu Jun 12 09:48:35 CEST 2003


CVS commit by staikos: 

add an isNull accessor here, if kstrvector is going to make it null.


  M +43 -19    kstvector.cpp   1.19
  M +3 -0      kstvector.h   1.23


--- kdeextragear-2/kst/kst/kstvector.cpp  #1.18:1.19
@@ -235,22 +235,46 @@ QString KstVector::fileLabel() const {
 }
 
-double *const KstVector::value() const { return _v; }
+double *const KstVector::value() const {
+  return _v;
+}
 
-double KstVector::min() const { return SMin->value(); }
+double KstVector::min() const {
+  return SMin->value();
+}
 
-double KstVector::max() const { return SMax->value(); }
+double KstVector::max() const {
+  return SMax->value();
+}
 
-double KstVector::mean() const { return SMean->value(); }
+double KstVector::mean() const {
+  return SMean->value();
+}
 
-double KstVector::minPos() const { return SMinPos->value(); }
+double KstVector::minPos() const {
+  return SMinPos->value();
+}
 
-int KstVector::sampleCount() const { return _size; }
+int KstVector::sampleCount() const {
+  return _size;
+}
 
-int KstVector::numNew() const { return NumNew; }
+int KstVector::numNew() const {
+  return NumNew;
+}
 
-int KstVector::numShift() const { return NumShifted; }
+int KstVector::numShift() const {
+  return NumShifted;
+}
 
-void KstVector::newSync() { NumNew = NumShifted = 0; }
+void KstVector::newSync() {
+  NumNew = NumShifted = 0;
+}
 
-int KstVector::length() const { return _size; }
+int KstVector::length() const {
+  return _size;
+}
+
+bool KstVector::isNull() const {
+  return _v ? false : true;
+}
 

--- kdeextragear-2/kst/kst/kstvector.h  #1.22:1.23
@@ -96,4 +96,7 @@ public:
   virtual void setTagName(const QString& newTag);
 
+  /** Is the vector null?  */
+  bool isNull() const; 
+
 protected: // Protected attributes
   /** current number of samples */




More information about the Kst mailing list