isis/src/base/apps/isisminer/PdsTableFormatStrategy.cpp
void PdsTableFormatStrategy::makeColumns(SharedResource &definition) {
  
    int nColumns(definition->count("Column"));
    validate("DataType", definition, nColumns, nColumns);
    validate("Bytes", definition, nColumns, 0);
    int nfmt = validate("Format", definition, nColumns, 0);
    int nunit = validate("Unit", definition, nColumns, 0);
    validate("DataDescription", definition, nColumns, 0);
  
    for ( int i = 0 ; i < nColumns ; i++) {
      QString name = definition->value("Column", i);
      SharedResource column(new PdsColumn(name));
      column->add("COLUMN_NUMBER", toString(i+1));
  
      column->add("NAME", name);
  
      column->add("DATA_TYPE", definition->value("DataType", i));
  
      column->add("BYTES", definition->value(name+"_Bytes", 
                                             definition->value("BYTES", "0", i)));
  
      if ( nfmt > i ) { 
        column->add("FORMAT", definition->value("Format", i));
      }
      if ( nunit > i ) { 
        column->add("UNIT", definition->value("Unit", i)); 
      }
  
      column->add("DESCRIPTION", definition->value("DataDescription", "NULL", i)); 
      m_columns.append(column);
    } 
  }
/**
   * @brief Goes through the Pds file and saves the column 
   *        information into the Pds format file.
   *
   * Goes through the Pds file and saves the column information 
   * into the Pds format file. Column entries are delimited by the 
   * delimiter. 
   *
   * @author 2012-07-15 Kris Becker
   *
   * @param definition PdsTableFormat Strategy PVL object 
   *                   definition
   *  
   */
@brief Goes through the Pds file and saves the column
information into the Pds format file.

Goes through the Pds file and saves the column information
into the Pds format file. Column entries are delimited by the
delimiter.



@param definition PdsTableFormat Strategy PVL object
definition
@brief Goes through the Pds file and saves the column information into the Pds format file . Goes through the Pds file and saves the column information into the Pds format file . Column entries are delimited by the delimiter . @param definition PdsTableFormat Strategy PVL object definition
void PdsTableFormatStrategy::makeColumns(SharedResource &definition) {
    int nColumns(definition->count("Column"));
    validate("DataType", definition, nColumns, nColumns);
    validate("Bytes", definition, nColumns, 0);
    int nfmt = validate("Format", definition, nColumns, 0);
    int nunit = validate("Unit", definition, nColumns, 0);
    validate("DataDescription", definition, nColumns, 0);
    for ( int i = 0 ; i < nColumns ; i++) {
      QString name = definition->value("Column", i);
      SharedResource column(new PdsColumn(name));
      column->add("COLUMN_NUMBER", toString(i+1));
      column->add("NAME", name);
      column->add("DATA_TYPE", definition->value("DataType", i));
      column->add("BYTES", definition->value(name+"_Bytes", 
                                             definition->value("BYTES", "0", i)));
      if ( nfmt > i ) { 
        column->add("FORMAT", definition->value("Format", i));
      }
      if ( nunit > i ) { 
        column->add("UNIT", definition->value("Unit", i)); 
      }
      column->add("DESCRIPTION", definition->value("DataDescription", "NULL", i)); 
      m_columns.append(column);
    } 
  }
void PdsTableFormatStrategy :: makeColumns ( SharedResource & definition ) { int nColumns ( definition -> count ( " " ) ) ; validate ( " " , definition , nColumns , nColumns ) ; validate ( " " , definition , nColumns , 0 ) ; int nfmt = validate ( " " , definition , nColumns , 0 ) ; int nunit = validate ( " " , definition , nColumns , 0 ) ; validate ( " " , definition , nColumns , 0 ) ; for ( int i = 0 ; i < nColumns ; i ++ ) { QString name = definition -> value ( " " , i ) ; SharedResource column ( new PdsColumn ( name ) ) ; column -> add ( " " , toString ( i + 1 ) ) ; column -> add ( " " , name ) ; column -> add ( " " , definition -> value ( " " , i ) ) ; column -> add ( " " , definition -> value ( name + " " , definition -> value ( " " , " " , i ) ) ) ; if ( nfmt > i ) { column -> add ( " " , definition -> value ( " " , i ) ) ; } if ( nunit > i ) { column -> add ( " " , definition -> value ( " " , i ) ) ; } column -> add ( " " , definition -> value ( " " , " " , i ) ) ; m_columns . append ( column ) ; } }
@brief Goes through the Pds file and saves the column
        information into the Pds format file.
@brief Goes through the Pds file and saves the column information into the Pds format file .