[Kst] branches/work/kst/portto4/kst/src/datasources/ascii

Peter Kümmel syntheticpp at gmx.net
Fri Jan 21 15:12:19 CET 2011


SVN commit 1216129 by kuemmel:

remove obsolete code

 M  +9 -14     asciisource.cpp  


--- branches/work/kst/portto4/kst/src/datasources/ascii/asciisource.cpp #1216128:1216129
@@ -130,6 +130,7 @@
 };
 
 
+//-------------------------------------------------------------------------------------------
 int DataInterfaceAsciiString::read(const QString& string, DataString::ReadInfo& p)
 {
   if (isValid(string) && p.value) {
@@ -140,6 +141,7 @@
 }
 
 
+//-------------------------------------------------------------------------------------------
 bool DataInterfaceAsciiString::isValid(const QString& string) const
 {
   return  ascii._strings.contains( string );
@@ -361,18 +363,8 @@
   return (forceUpdate ? Updated : (new_data ? Updated : NoChange));
 }
 
-//-------------------------------------------------------------------------------------------
-/* TODO needed?
-int AsciiSource::readString(QString &S, const QString& string) {
-  if (string == "FILE") {
-    S = _filename;
-    return 1;
-  }
-  return 0;
-}
-*/
 
-
+//-------------------------------------------------------------------------------------------
 int AsciiSource::columnOfField(const QString& field) const
 {
   if (_fieldList.contains(field)) {
@@ -406,6 +398,8 @@
   }
 }
 
+
+//-------------------------------------------------------------------------------------------
 int AsciiSource::readField(double *v, const QString& field, int s, int n) 
 {
   if (n < 0) {
@@ -436,14 +430,12 @@
   }
   bufread = readFromFile(file, _tmpBuffer, bufstart, bufread);
 
-
 #ifdef KST_DONT_CHECK_INDEX_IN_DEBUG
   const char* buffer = _tmpBuffer.constData();
 #else
   const QVarLengthArray<char, KST_PREALLOC>& buffer = _tmpBuffer;
 #endif
 
-
   if (_config._columnType == AsciiSourceConfig::Fixed) {
     LexicalCast lexc;
     lexc.setDecimalSeparator(_config._useDot, _config._localSeparator);
@@ -467,7 +459,7 @@
 }
 
 
-
+//-------------------------------------------------------------------------------------------
 void AsciiSource::readColumns(double* v, const char* buffer, int bufstart, int bufread, int col, int s, int n, bool (*isColumnDelemiterFunction)(char))
 {
   LexicalCast lexc;
@@ -501,6 +493,7 @@
 }
 
 
+//-------------------------------------------------------------------------------------------
 void AsciiSource::toDouble(const LexicalCast& lexc, const char* buffer, int bufread, int ch, double* v, int row)
 {
   const char* here = &buffer[ch];
@@ -554,6 +547,7 @@
   return QStringList() << "FRAMES";
 }
 
+
 //-------------------------------------------------------------------------------------------
 QStringList AsciiSource::stringListFor(const QString& filename, AsciiSourceConfig*) 
 {
@@ -698,6 +692,7 @@
   internalDataSourceUpdate();
 }
 
+
 //-------------------------------------------------------------------------------------------
 bool AsciiSource::supportsTimeConversions() const 
 {


More information about the Kst mailing list