#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>

// #define _DEBUG_
#include "QFramework/TQLibrary.h"

#include "QFramework/TQTable.h"
#include "QFramework/TQUtils.h"

#include <math.h>

////////////////////////////////////////////////////////////////////////////////////////////////
//
// The TQTable class provides a general modular interface for creating, modifying, reading
// and writing tables (aka two-dimensional arrays of text), including, but not limited to
// - reading and writing CSV files
// - reading and writing HTML files
// - reading and writing LaTeX-formatted text files
// - reading and writing unicode-ascii-art formatted text files
//
// Some of these features are still under developement, but general class operations should
// be stable already. This class was designed as an enhancement to the TQCutflowPrinter,
// but can be used for other purposes as well.
//
////////////////////////////////////////////////////////////////////////////////////////////////

ClassImp(TQTable)

using namespace TQStringUtils;

TQTable::TQTable() :
  TQNamedTaggable("TQTable"),
  nfields(0),
  ncols(0),
  nrows(0),
  data(NULL),
  autoExpand(true),
  manualAllocation(false)
{
  /// default constructor
  DEBUGclass("default constructor called");
  this->vlines.push_back(0);
  this->vlines.push_back(1);
  this->hlines.push_back(0);
  this->hlines.push_back(1);
  this->setup();
}

TQTable::TQTable(const TString& name) :
  TQNamedTaggable(name),
  nfields(0),
  ncols(0),
  nrows(0),
  data(NULL),
  autoExpand(true),
  manualAllocation(false)
{
  /// default constructor (with name)
  DEBUGclass("named constructor called");
  this->vlines.push_back(0);
  this->vlines.push_back(1);
  this->hlines.push_back(0);
  this->hlines.push_back(1);
  this->setup();
}


TQTable::TQTable(const TQTable* other) :
  TQNamedTaggable(other ? other->GetName() : "TQTable"),
  nfields(0),
  ncols(0),
  nrows(0),
  data(NULL),
  autoExpand(true),
  manualAllocation(false)
{
  // copy constructor for TQTable class
  DEBUGclass("pointer copy constructor called");
  if(other){
    this->appendLines(*other,0);
  }
  this->importTags(other);
}

TQTable::TQTable(const TQTable& other) :
  TQNamedTaggable(other.GetName()),
  nfields(0),
  ncols(0),
  nrows(0),
  data(NULL),
  autoExpand(true),
  manualAllocation(false)
{
  // copy constructor for TQTable class
  DEBUGclass("reference copy constructor called");
  this->appendLines(other,0);
  this->importTags(other);
}

TQTable::TQTable(TList* l) :
  TQNamedTaggable(l ? l->GetName() : "TList"),
  nfields(0),
  ncols(0),
  nrows(0),
  data(NULL),
  autoExpand(false),
  manualAllocation(false)
{
  // converting constructor for TQTable class from TList
  DEBUGclass("TList copy constructor called");
  this->setFromTList(l);
}

void TQTable::merge(TQTable* other){
  // append the extra lines from another instance to this one (merge)
  if (!other) return;
  int oldrows = this->nrows;
  this->expand(this->nrows + (other->nrows - 1),std::max(this->ncols,other->ncols));
  int offset = oldrows * this->ncols;

  int nElements = 0;
  for(unsigned int i=0; i<other->nrows - 1; i++){
    if(this->findRow(other->getEntryPlain(1+i,0,false),0) < 0){
      for(unsigned int j=0; j<other->ncols; j++){
        TQTaggable* entry = other->getEntryInternal(1+i,j);
        if(entry){
          this->data[offset + nElements*this->ncols + j] = new TQTaggable(entry);

        } else {
          this->data[offset + nElements*this->ncols + j] = NULL;
        }
      }
      ++nElements;
    }
  }
  std::cout<<"done!"<<std::endl;
}

int TQTable::appendLines(const TQTable& other, int startAt, bool ignoreHlines){
  // append the lines from another instance to this one (deep copy)
  DEBUGclass("appendLines called");
  if(!ignoreHlines){
    if(other.hlines.size() > 0){
      if(this->nrows == 0){
        this->hlines.push_back(other.hlines[0]);
      } else {
        for(unsigned int i=this->hlines.size(); i<=this->nrows; i++){
          this->hlines.push_back(0);
        }
      }
    }
  }
  int oldrows = this->nrows;
  this->expand(this->nrows + (other.nrows - startAt),std::max(this->ncols,other.ncols));
  int offset = oldrows * this->ncols;
  int nElements = 0;
  for(unsigned int i=0; i<other.nrows - startAt; i++){
    for(unsigned int j=0; j<other.ncols; j++){
      TQTaggable* entry = other.getEntryInternal(startAt+i,j);
      if(entry){
        this->data[offset + i*this->ncols + j] = new TQTaggable(entry);
        nElements++;
      } else {
        this->data[offset + i*this->ncols + j] = NULL;
      }
    }
  }
  if(!ignoreHlines){
    for(unsigned int i=startAt+1; i< other.hlines.size(); i++){
      this->hlines.push_back(other.hlines[i]);
    }
  }
  return nElements;
}

int TQTable::appendLines(const TQTable* other, int startAt, bool ignoreHlines){
  // append the lines from another instance to this one (deep copy)
  DEBUGclass("appendLines called");
  if(other) return this->appendLines(*other,startAt,ignoreHlines);
  return -1;
}


TQTable::~TQTable(){
  /// default destructor
  DEBUGclass("destructor called");
  for(unsigned int i=0; i<(this->nfields); i++){
    if(this->data[i]) delete this->data[i];
  }
  if(this->data){
    if(manualAllocation) free(this->data);
    else delete[] this->data;
  }
}

int TQTable::getNcols(){
  // return the number of columns
  return this->ncols;
}
int TQTable::getNrows(){
  // return the number of rows
  return this->nrows;
}

bool TQTable::setVline(int col, int type){
  // define the vertical line between columns
  // col-1 and col to be of the given type
  // supported types are:
  // 0: no line
  // 1: single solid line (black)
  // 2: double solid line (black)
  if(col < 0) col = this->ncols - col;
  while((unsigned int)(col+1) > this->vlines.size()) this->vlines.push_back(0);
  this->vlines[col] = type;
  return true;
}

void TQTable::clearColAlign(){
  // clear all predefined column horizontal alignments
  this->colAlign.clear();
}

void TQTable::setColAlign(unsigned int col, TString align){
  // set the horizontal alignment of the given column
  // known alignments are
  // l: left-aligned
  // r: right-aligned
  // c: centered
  //if(col < 0) col = this->ncols - col; //this condition is always false
  while(col+1 > this->colAlign.size()) this->colAlign.push_back(this->getTagStringDefault("colAlign","c"));
  this->colAlign[col] = align;
}

TString TQTable::getColAlign(unsigned int col){
  // retrieve the horizontal alignment of the given column
  //@tag: colAlign Sets the default alignment of columns. Default "c", other values "l","r".
  if(col >= this->colAlign.size()) return this->getTagStringDefault("colAlign","c");
  return this->colAlign[col];
}

TString TQTable::getColAlignHTML(unsigned int col){
  // retrieve the horizontal alignment of the given column
  // this function returns the html-aliases for the alignments, i.e.
  // "center" for centered
  // "right" for right-aligned
  // "left" for left-aligned
  TString align = (col >= this->colAlign.size() ? this->getTagStringDefault("colAlign","c") : this->colAlign[col]);
  if(align == "c") return "center";
  if(align == "r") return "right";
  if(align == "l") return "left" ;
  return "";
}

bool TQTable::setHline(int row, int type){
  // define the vertical line between rows
  // row-1 and row to be of the given type
  // supported types are:
  // 0: no line
  // 1: single solid line (black)
  // 2: double solid line (black)
  if(row < 0) row = this->nrows - row;
  while((unsigned int)(row+1) > this->hlines.size()) this->hlines.push_back(0);
  this->hlines[row] = type;
  return true;
}

bool TQTable::clearVlines(){
  // clear all vertical lines
  this->vlines.clear();
  return true;
}

bool TQTable::clearHlines(){
  // clear all horizontal lines
  this->hlines.clear();
  return true;
}

bool TQTable::readCSVfile(const TString& fname, const TString& sep, const TString& leftquote, const TString& rightquote){
  // aquire table data from the given CSV-formatted file
  DEBUGclass("readCSVfile called");
  std::ifstream in(fname.Data());
  if(!in.is_open()) return false;
  this->readCSV(&in,sep,leftquote,rightquote);
  return true;
}

bool TQTable::readTSVfile(const TString& fname, const TString& seps, int ignoreHeadLines, int nsepmin){
  // aquire table data from the given TSV-formatted file
  DEBUGclass("readTSVfile called");
  std::ifstream in(fname.Data());
  if(!in.is_open()) return false;
  std::string str;
  int i=0;
  while(i<ignoreHeadLines && in.good()){
    std::getline(in,str);
    i++;
  }
  this->readTSV(&in,seps,nsepmin);
  return true;
}

bool TQTable::readLaTeXfile(const TString& fname){
  // aquire table data from the given LaTeX-formatted file
  DEBUGclass("readLaTeXfile called");
  std::ifstream in(fname.Data());
  if(!in.is_open()) return false;
  this->readLaTeX(&in);
  return true;
}

bool TQTable::readHTMLfile(const TString& fname){
  // aquire table data from the given HTML-formatted file
  DEBUGclass("readHTMLfile called");
  std::ifstream in(fname.Data());
  if(!in.is_open()) return false;
  this->readHTML(&in);
  return true;
}

void TQTable::readCSV(std::istream* input, const TString& sep, const TString& leftquote, const TString& rightquote){
  // aquire table data from the given CSV-formatted stream
  DEBUGclass("readCSV called");
  this->shrink();
  std::string linebuffer;
  bool skip;
  do{
    getline(*input, linebuffer);
    TString lb = linebuffer;
    TQStringUtils::removeLeadingBlanks(lb);
    skip = TQStringUtils::isEmpty(lb, true);
    skip = skip || lb.BeginsWith("#");
  } while (skip);
  int estCols = this->ncols;
  if(estCols == 0){
    estCols = TQStringUtils::countText(linebuffer, sep)+1;
  } else getline(*input, linebuffer);
  unsigned int i = this->nrows;
  this->expand(this->nrows+256,estCols);
  unsigned int pos=0;
  unsigned int nextpos=0;
  bool eof = false;
  bool empty;
  //@tag: [readFormatPrior] Defines the encoding/format assumed when reading from an external source. If this is set to
  //@tag "" or "verbatim", the format is automatically determined via TQStringUtils::findFormat. Unless the prior is empty, only the sepcified/automatically determined variant is overwritten. If variants different from prior are empty, an attempt for an automatic conversion is made. Possible values: "", "verbatim", "unicode", "ascii", "latex", "roottex" and "html".
  TString formatPrior = this->getTagStringDefault("readFormatPrior","");
  while(!eof){
    eof = !input->good();
    pos =0;
    nextpos = 0;
    if(i == this->nrows){
      this->expand(2*this->nrows,this->ncols);
    }
    empty = true;
    if((linebuffer.size() > 0) && (linebuffer[0] != '#')){
      for(unsigned int j=0; j<this->ncols; j++){
        if(pos < linebuffer.size()){
          nextpos = findFree(linebuffer, sep, leftquote, rightquote, pos);
          if(/*nextpos < 0 ||*/ nextpos > linebuffer.size()) nextpos = linebuffer.size(); //nextpos is unsigned, hence (nextpos<0) == false
          TQTaggable* newEntry = new TQTaggable();
          TString content = TQStringUtils::trim(linebuffer.substr(pos, nextpos-pos), leftquote+rightquote+" ");
          this->setContent(newEntry,content,formatPrior);
          this->data[i*this->ncols + j] = newEntry;
          pos = nextpos+1;
          empty = false;
        } else this->data[i*this->ncols + j] = NULL;
      }
    }
    if(!empty) i++;
    if(!eof) getline(*input, linebuffer);
  }
  this->shrink();
  this->autoExpand = false;
}

void TQTable::readTSV(std::istream* input, const TString& seps, int nsepmin){
  // aquire table data from the given TSV-formatted stream
  DEBUGclass("readTSV called");
  this->shrink();
  std::string linebuffer;
  unsigned int i = this->nrows;
  this->expand(this->nrows+256,this->ncols == 0 ? 256 : this->ncols);
  unsigned int pos=0;
  bool eof = false;
  bool empty;
  //tag documentation see readCSV(...)
  TString formatPrior = this->getTagStringDefault("readFormatPrior","");
  while(!eof){
    eof = !input->good();
    if(eof) break;
    getline(*input, linebuffer);
    pos = findFirstNotOf(linebuffer, " \t");
    if(i == this->nrows){
      this->expand(2*this->nrows,this->ncols);
    }
    empty = true;
    if((linebuffer.size() > 0) && (linebuffer[0] != '#')){
      for(unsigned int j=0; j<this->ncols; j++){
        if(pos < linebuffer.size()){
          unsigned int tmppos = pos;
          unsigned int nextpos = pos;
          while(tmppos < nextpos+nsepmin && linebuffer[nextpos] != '\t'){
            // std::cout << nextpos << "/" << tmppos << std::endl;
            nextpos = findFirstOf(linebuffer, seps, tmppos);
            if(/*nextpos < 0 ||*/ nextpos > linebuffer.size()){//nextpos is unsigned, hence (nextpos<0) == false
              nextpos = linebuffer.size();
              break;
            }
            tmppos = findFirstNotOf(linebuffer, seps, nextpos);
            if(/*tmppos < 0 ||*/ tmppos > linebuffer.size()){ //tmppos is unsigned, hence (tmppos<0) == false
              break;
            }
          }
          // std::cout << linebuffer.substr(0,pos) << "|" << pos <<"|" << linebuffer.substr(pos,nextpos-pos) << "|" <<nextpos << "|" << linebuffer.substr(nextpos) << std::endl;
          TQTaggable* newEntry = new TQTaggable();
          TString content = TQStringUtils::trim(linebuffer.substr(pos, nextpos-pos));
          if(!content.IsNull()){
            this->setContent(newEntry,content,formatPrior);
            this->data[i*this->ncols + j] = newEntry;
            empty = false;
          }
          pos = findFirstNotOf(linebuffer,seps,nextpos);
        } else this->data[i*this->ncols + j] = NULL;
      }
    }
    if(!empty){
      i++;
    }
  }
  this->autoExpand = false;
  this->shrink();
}


void TQTable::readHTML(std::istream* input){
  // aquire table data from the given HTML-formatted stream
  // TODO: parse style tags
  DEBUGclass("readHTML called");
  this->shrink();
  TString content = readTextFromFile(input);
  unsigned int pos = TQStringUtils::find(content,"<tr>");
  unsigned int nextpos= TQStringUtils::find(content,"</tr>", pos);
  std::string linebuffer(content(pos, nextpos-pos).Data());
  if(this->ncols == 0) this->ncols = TQStringUtils::countText(linebuffer, "<th>");
  unsigned int i = this->nrows;
  this->expand(this->nrows+256,this->ncols == 0 ? 256 : this->ncols);
  unsigned int lineend = 1;
  while(pos < (unsigned int)content.Length()){
    if(i == this->nrows){
      this->expand(this->nrows*2,this->ncols);
    }
    lineend = std::min(TQStringUtils::find(content,"</tr>", lineend+1), content.Length());
    for(unsigned int j=0; j<this->ncols; j++){
      pos = std::min(TQStringUtils::find(content,"<td>", pos), TQStringUtils::find(content,"<th>", pos));
      if(pos<lineend){
        nextpos = std::min(TQStringUtils::find(content,"</td>", pos), TQStringUtils::find(content,"</th>", pos));
        TQTaggable* newEntry = new TQTaggable();
        TString newcontent = TQStringUtils::trim(content(pos+4, nextpos-pos-4), "<> ");
        this->setContent(newEntry,newcontent,"html");
        this->data[i*this->ncols + j] = newEntry;
        pos = nextpos;
      } else this->data[i*this->ncols + j] = NULL;
    }
    i++;
    if(lineend < (unsigned int)content.Length()) pos = TQStringUtils::find(content,"<tr>", lineend);
    else break;
  }
  this->autoExpand = false;
  this->shrink();
}

void TQTable::readLaTeX(std::istream* input){
  // aquire table data from the given LaTeX-formatted stream
  this->shrink();
  std::string tabularnewline = "\\tabularnewline";
  TString content = readTextFromFile(input);
  unsigned int pos = content.Length();
  std::vector<std::string> tableHeads;
  tableHeads.push_back("tabular");
  tableHeads.push_back("supertabular");
  tableHeads.push_back("table");
  tableHeads.push_back("longtable");
  for(unsigned int i=0; i<tableHeads.size(); i++){
    pos = std::min(pos, (unsigned int)TQStringUtils::find(content,"\\begin{"+tableHeads[i]+"}"));
  }
  pos = TQStringUtils::find(content,"}", pos);
  pos = TQStringUtils::find(content,"{", pos)+1;
  unsigned int nextpos = findParenthesisMatch(content, pos, "{", "}");
  std::vector<TString> buffer = TQStringUtils::split(content(pos, nextpos-pos), " |\t", "{", "}");
  std::string bufstr;
  unsigned int i = this->nrows;
  this->expand(this->nrows+256,buffer.size());
  pos = nextpos;
  nextpos = TQStringUtils::find(content,tabularnewline, pos);
  while(pos < (unsigned int)content.Length()){
    if(i == this->nrows){
      this->expand(this->nrows*2,this->ncols);
    }
    nextpos = std::min(TQStringUtils::find(content,tabularnewline, pos), content.Length());
    bufstr = TQStringUtils::compactify(content(pos, nextpos-pos));
    buffer = TQStringUtils::split(bufstr, "&");
    for(unsigned int j=0; j<std::min((size_t)(this->ncols), buffer.size()); j++){
      TQTaggable* newEntry = new TQTaggable();
      TString content = TQStringUtils::trim(buffer[j], "\t\n ");
      this->setContent(newEntry,content,"latex");
      this->data[i*this->ncols + j] = newEntry;
    }
    i++;
    pos = nextpos+tabularnewline.size();
  }
  this->autoExpand = false;
  this->shrink();
}


bool TQTable::print(std::ostream* output, TQTaggable tags){
  // print table data to the given stream. format can specified by style tags. 
  TString format = tags.getTagStringDefault("format","plain");
  format.ToLower();
  return this->print(output,format,tags);
}

bool TQTable::print(std::ostream* output, const TString& format, TQTaggable tags){
  // print table data to the given stream. format is specifiec explicitly,
  tags.setGlobalOverwrite(false);
  tags.importTags(this);
  if(format == "plain" || format == "unicode" || format=="txt") return this->printPlain(output,tags);
  if(format == "latex" || format=="tex") return this->printLaTeX(output,tags);
  if(format == "html") return this->printHTML(output,tags);
  if(format == "csv") return this->printCSV(output,tags);
  return false;
}

bool TQTable::printCSV(std::ostream* output, TQTaggable tags){
  // print table data to the given stream. format is CSV and can specified by style tags.
  tags.setGlobalOverwrite(false);
  tags.importTags(this);
  TString format = tags.getTagStringDefault("format","csv");
  TString sep = tags.getTagStringDefault("sep",",");
  TString quote = tags.getTagStringDefault("quote","\"");
  if(!output || !this->data) return false;
  for(unsigned int i=0; i<this->nrows; i++){
    for(unsigned int j=0; j<this->ncols-1; j++){
      if(quote.IsNull()) *output << this->getEntry(i,j,format);
      else *output << quote << this->getEntry(i,j,format) << quote << sep;
    }
    if(quote.IsNull()) *output << this->getEntry(i,this->ncols-1,format);
    else *output << quote << this->getEntry(i,this->ncols-1,format) << quote << std::endl;
  }
  return true;
}

bool TQTable::printHTML(std::ostream* output, TQTaggable tags){
  // print table data to the given stream. format is HTML and can specified by style tags.
  tags.setGlobalOverwrite(false);
  tags.importTags(this);
  TString title = tags.getTagStringDefault("title",this->GetName());
  if(!output || !this->data) return false;
  //@tag:[standalone] If set to true a standalone document is created. Argument tag overrides object tag.
  bool standalone = tags.getTagBoolDefault("standalone",false);
  if(standalone){
    *output << "<html>" << std::endl;
    *output << "<head>" << std::endl;
    *output << "<title>" << title << "</title>" << std::endl;
    *output << "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" << std::endl;
    *output << "</head>" << std::endl;
    *output << "<body>" << std::endl;
  }
  //@tag: [comment] The value of this tag is inserted at the beginning of the output document, enclosed between commentary characters corresponding to the output format. Argument tag overrides object tag.
  TString comment; if(tags.getTagString("comment",comment)) *output << "<!-- " << comment << " -->" << std::endl;
  //@tag: [preamble.html] The value of this tag is inserted before the beginning of the actual table. Argument tag overrides object tag.
  TString preamble = ""; if(tags.getTagString("preamble.html",preamble)) *output << preamble << std::endl;
  //@tag: [tableStyle.html] The value of this tag specifies the html table style, default is "border-collapse: collapse". Argument tag overrides object tag.
  *output << "<table style=\""+this->getTagStringDefault("tableStyle.html","border-collapse: collapse")+"\">" << std::endl;
  for(unsigned int i=0; i<this->nrows; i++){
    *output << "<tr>";
    for(unsigned int j=0; j<this->ncols; j++){
      *output << this->getEntryHTML(i,j) << " ";
    }
    *output << "</tr>" << std::endl;
  }
  *output << "</table>" << std::endl;
  if(standalone){
    *output << "</body>" << std::endl;
    *output << "</html>" << std::endl;
  }
  return true;
}

bool TQTable::printLaTeX(std::ostream* output, TQTaggable tags){
  // print table data to the given stream. format is LaTeX and can specified by style tags.
  tags.setGlobalOverwrite(false);
  tags.importTags(this);
  //@tag:[env] Specifies the table environment used for LaTex output, default is "tabular". Other options include "longtable", for example. Arugment tag overrides object tag.
  TString env = tags.getTagStringDefault("env","tabular");
  if(!output || !this->data) return false;
  // for tag documentation see printHTML
  TString comment; if(tags.getTagString("comment",comment)) *output << "%%% " << comment << std::endl;
  // for tag documentation see printHTML
  bool standalone = tags.getTagBoolDefault("standalone",false);
  //@tag:[layout] Sets the layout of the LaTeX document. The default "standalone" will create a document of clas standalone, other values lead to document class article. If the layout is set to "adjustbox", an adjustbox environment is created around the table. Arugment tag overrides object tag.
  TString layout = tags.getTagStringDefault("layout","standalone");
  layout.ToLower();
  if(standalone){
    *output << "\\documentclass";
    if(layout == "standalone" && env == "longtable") *output << "[varwidth=21cm]";
    *output << "{";
    if(layout == "standalone") *output << "standalone";
    else *output << "article";
    *output << "}" << std::endl;
    *output << "\\usepackage{luatex85}" << std::endl;
    *output << "\\usepackage[table]{xcolor}" << std::endl;
    *output << "\\usepackage{multirow}" << std::endl;
    *output << "\\usepackage{rotating}" << std::endl;
    *output << "\\usepackage{pifont}" << std::endl;
    if(env == "longtable"){
      *output << "\\usepackage{longtable}" << std::endl;
    }
    if(layout == "adjustbox") *output << "\\usepackage{adjustbox}" << std::endl;
    *output << "\\newcommand{\\xmark}{\\ding{55}}" << std::endl;
    *output << "\\providecommand\\rotatecell[2]{\\rotatebox[origin=c]{#1}{#2}}" << std::endl;
  } else {
    *output << "\\providecommand{\\xmark}{{\\sffamily \\bfseries X}}" << std::endl;;
    *output << "\\providecommand\\rotatecell[2]{\\rotatebox[origin=c]{#1}{#2}}" << std::endl;
  }
  //@tag:[preamble.latex] Defines additions to the LaTeX preamble (inserted before \begin{document}). Arugment tag overrides object tag.
  TString preamble = ""; if(tags.getTagString("preamble.latex",preamble)) *output << preamble << std::endl;
  if(standalone){
    *output << "\\begin{document}" << std::endl;
    if(layout == "adjustbox") *output << "\\begin{adjustbox}";
  }
  *output << "\\begin{" << env << "}{";
  for(unsigned int j=0; j<this->ncols; j++){
    if(j < this->vlines.size() && this->vlines[j] > 0) *output << TQStringUtils::repeat("|",this->vlines[j]);
    *output << " "+this->getColAlign(j)+" ";
  }
  if(this->ncols < this->vlines.size() && this->vlines[this->ncols] > 0) *output << TQStringUtils::repeat("|",this->vlines[this->ncols]);
  *output << "}" << std::endl;
  for(unsigned int i=0; i<this->nrows; i++){
    if(i < this->hlines.size() && this->hlines[i] > 0){
      for(int j=0; j<this->hlines[i]; j++){
        *output << "\\hline";
      }
      *output << std::endl;
    }

    bool first = true;
    unsigned int multicol = 0;
    for(unsigned int j=0; j<this->ncols; j++){
      TQTaggable* entry = this->getEntryInternal(i,j,false);
      if(multicol == 0){
        if(!first) *output << " & ";
        first = false;
        if(entry){
          multicol = entry->getTagIntegerDefault("multicol",0);
          int multirow;
          bool doMultirow = entry->getTagInteger("multirow",multirow);
          if(doMultirow) *output << "\\multirow{" << multirow << "}{*}{";
          //if(multicol < 0) multicol = this->ncols-j; //this is always false as multirow is unsigned. FIXME: this seems inconsistent with 'multicol'!!
          if(multicol > 1){
            *output << "\\multicolumn{" << multicol << "}{" <<
              TQStringUtils::repeat("|",j<this->vlines.size()?this->vlines[j]:0) <<
              this->getColAlign(j) <<
              TQStringUtils::repeat("|",j+multicol<this->vlines.size()?this->vlines[j+multicol]:0) <<
              "}{" << this->getEntryLaTeX(i,j) << "}";
          } else {
            *output << this->getEntryLaTeX(i,j);
          }
          if(doMultirow) *output << "}";
        }
      }
      if(multicol > 0) multicol--;
    }
    if(i+1 < this->nrows)
      *output << "\\tabularnewline" << std::endl;
    else
      *output << std::endl;
  }
  if(this->nrows < this->hlines.size() && this->hlines[this->nrows] > 0){
    *output << "\\tabularnewline" << std::endl;
    for(int j=0; j<this->hlines[this->nrows]; j++){
      *output << "\\hline";
    }
    *output << std::endl;
  }
  *output << "\\end{" << env << "}" << std::endl;
  if(standalone){
    if(layout == "adjustbox") *output << "\\end{adjustbox}";
    *output << "\\end{document}" << std::endl;
  }
  return true;
}

bool TQTable::printPlain(std::ostream* output, TQTaggable tags){
  // print table data to the given stream. format is plain ascii/unicode and can specified by style tags.
  tags.setGlobalOverwrite(false);
  tags.importTags(this);
  //@tag: [sep] Defines the seperator between entries for plain and CSV printing. Defaults are " " (plain) and "," (CSV). Arugment tag overrides object tag.
  TString sep = tags.getTagStringDefault("sep"," ");
  //@tag: [cellWidth] Defines the width of cells for plain printing in characters for plain printing, default: 10. If this tag is seet and adjustColWidth is set to true, the value of this tag is used as the maximum column/cell width. Arugment tag overrides object tag.
  int cellwidth = tags.getTagIntegerDefault("cellWidth",10);
  //@tag: [adjustColWidth] If set to true the cell width is automatically determined from the content (default: false). The maximum cell width can be set via the tag cellWidth. Arugment tag overrides object tag.
  bool adjustColWidth = tags.getTagBoolDefault("adjustColWidth",false);
  if(!output || !this->data) return false;
  //for tag documentation see printHTML
  TString comment; if(tags.getTagString("comment",comment)) *output << "# " << comment << std::endl;
  //@tag: [preamble.plain] Preamble text inserted before the table in plain text printing. Arugment tag overrides object tag.
  TString preamble = ""; if(tags.getTagString("preamble.plain",preamble)) *output << preamble << std::endl;
  std::vector<int> cellwidths;
  int linewidth = 0;
  //@tag: [allowUnicode] Selects if unicode characters are allowed in plain printing not (default: true). Arugment tag overrides object tag.
  bool unicode = tags.getTagBoolDefault("allowUnicode",true);
  for(unsigned int j=0; j<this->ncols; j++){
    if(adjustColWidth){
      int width = 0;
      for(unsigned int i=0; i<this->nrows; i++){
        TString entry = this->getEntryPlain(i,j);
        width = std::max(TQStringUtils::getWidth(entry),width);
      }
      //for tag documentation see above
      cellwidth = std::min(width,tags.getTagIntegerDefault("cellWidth",width));
    }
    cellwidths.push_back(cellwidth);
    linewidth += cellwidth;
  }
  for(unsigned int i=0; i<this->hlines.size(); i++){
    if(hlines[i] > 0) linewidth += hlines[i]+sep.Length();
  }
  for(unsigned int i=0; i<this->nrows; i++){
    if(i < this->hlines.size() && this->hlines[i] > 0){
      for(int j=0; j<this->hlines[i]; j++){
        *output << TQStringUtils::repeat("-",linewidth) << std::endl;
      }
    }
    for(unsigned int j=0; j+1<this->ncols; j++){
      if(j < this->vlines.size() && this->vlines[j] > 0) *output << TQStringUtils::repeat("|",this->vlines[j]) << sep;
      *output << TQStringUtils::fixedWidth(this->getEntryPlain(i,j,unicode),
                                           cellwidths[j],this->getColAlign(j)) << sep;
    }
    if(this->ncols-1 < this->vlines.size() && this->vlines[this->ncols-1] > 0) *output << TQStringUtils::repeat("|",this->vlines[this->ncols-1]) << sep;
    *output << TQStringUtils::fixedWidth(this->getEntryPlain(i,this->ncols-1,unicode),cellwidths[this->ncols-1],this->getColAlign(this->ncols-1)) << std::endl;
    if(this->ncols < this->vlines.size() && this->vlines[this->ncols] > 0) *output << TQStringUtils::repeat("|",this->vlines[this->ncols]) << sep;
  }
  return true;
}


TQTaggable* TQTable::getEntryInternal(unsigned int i, unsigned int j, bool create){
  // retrieve the object representing the table entry at row i and column j
  // if create is true, missing entries will be created
  DEBUGclass("trying to access entry %d/%d (create=%d)",i,j,(int)create);
  //if(i < 0 || j < 0) return NULL; //redundant as i,j are unsigned
  if(i>=this->nrows || j>=this->ncols){
    if(create && this->autoExpand) {
      if(!this->expand(std::max(this->nrows,i+1),std::max(this->ncols,j+1))) return NULL;
    }
  }
  if(i<this->nrows && j<this->ncols){
    if(this->data[i*this->ncols + j]){
      return this->data[i*this->ncols + j];
    } else if(create){
      TQTaggable* newEntry = new TQTaggable();
      this->data[i*this->ncols + j] = newEntry;
      return newEntry;
    }
  }
  return NULL;
}


TQTaggable* TQTable::getEntryInternal(unsigned int i, unsigned int j) const {
  // retrieve the object representing the table entry at row i and column j
  if(i<this->nrows && j<this->ncols){
    if(this->data[i*this->ncols + j]){
      return this->data[i*this->ncols + j];
    }
  }
  return NULL;
}

int TQTable::getEntryInteger(unsigned int i, unsigned int j, bool sanitizeString){
  // retrieve the table entry at row i and column j
  // as an integer. If sanitizeString is true all blanks (whitespaces) are removed
  // from the string representation before the conversion to int.
  int retval = std::numeric_limits<int>::quiet_NaN();
  TQTaggable* entry = this->getEntryInternal(i,j);
  if(!entry) return retval;
  //@tag: [content.value] This tag contains the numerical content of the corresponding cell.
  if(entry->getTagInteger("content.value",retval)) return retval;
  TString content = this->formatEntryContents(entry,"ascii");
  if (sanitizeString) TQStringUtils::removeAll(content, TQStringUtils::getAllBlanks(), TString::ECaseCompare::kIgnoreCase,-1);
  return content.Atoi();
}

double TQTable::getEntryDouble(unsigned int i, unsigned int j, bool sanitizeString){
  // retrieve the table entry at row i and column j
  // as a double. If sanitizeString is true all blanks (whitespaces) are removed
  // from the string representation before the conversion to double.
  double retval = std::numeric_limits<double>::quiet_NaN();
  TQTaggable* entry = this->getEntryInternal(i,j);
  if(!entry) return retval;
  //@tag: [content.value] This tag contains the numerical content of the corresponding cell.
  if(entry->getTagDouble("content.value",retval)) return retval;
  TString content = this->formatEntryContents(entry,"ascii");
  if (sanitizeString) TQStringUtils::removeAll(content, TQStringUtils::getAllBlanks(), TString::ECaseCompare::kIgnoreCase,-1);
  return content.Atof();
}

TString TQTable::getEntry(unsigned int i, unsigned int j, TString format){
  // retrieve the table entry at row i and column j
  // in the given format
  format.ToLower();
  if(format=="latex") return this->getEntryLaTeX(i,j);
  if(format=="html") return this->getEntryHTML(i,j);
  if(format=="unicode") return this->getEntryUnicode(i,j);
  if(format=="plain") return this->getEntryUnicode(i,j);
  if(format=="ascii") return this->getEntryASCII(i,j);
  if(format=="verbatim") return this->getEntryVerbatim(i,j);
  if(format=="csv") return this->getEntryASCII(i,j);
  return this->getEntryASCII(i,j);
}

TString TQTable::getEntryPlain(unsigned int i, unsigned int j, bool allowUnicode){
  // retrieve the table entry at row i and column j
  // in plain ascii/unicode format
  TQTaggable* entry = this->getEntryInternal(i,j);
  TString content = entry ? entry->getTagStringDefault( (allowUnicode? "content.unicode":"content.ascii"), this->formatEntryContents(entry,allowUnicode ? "unicode" : "ascii")) : this->formatEntryContents(entry,allowUnicode ? "unicode" : "ascii");
  if(content.IsNull()) return content;
  if(allowUnicode){
    TString textcolor = "";
    //@tag: [textcolor] Defines the text color for LaTex, HTML and plain (unicode) printing of the cell entry this tag is set on. In case of HTML/LaTex the value needs to be a valid color for the desired output type. For plain (unicode) printing "blue", "red", "yellow" and "pink" are available.
    //@tag: [cellcolor] Defines the cell's background color for LaTex and HTML printing of the cell entry this tag is set on. The value needs to be a valid color for the desired output type.
    if(entry->getTagString("textcolor",textcolor)){
      if(textcolor == "blue") content = TQStringUtils::makeBoldBlue(content);
      if(textcolor == "red") content = TQStringUtils::makeBoldRed(content);
      if(textcolor == "yellow") content = TQStringUtils::makeBoldYellow(content);
      if(textcolor == "pink") content = TQStringUtils::makeBoldPink(content);
    //@tag: [bold] The entry this tag is set on is printed in bold font if this object tag is set to true. Supported for HTML,LaTeX. For plain printing, the "textcolor" object tag may not be set.
    } else if(entry->getTagBoolDefault("bold",false)){
      content = TQStringUtils::makeBoldWhite(content);
    }
  }
  if(entry){
    //@tag: [prefixText.plain,suffixText.plain] This entry tag determines the text to be prepended/appended to the cell entry for plain text output
    TString prefixText; if(entry->getTagString("prefixText.plain",prefixText)) content.Prepend(prefixText);
    TString suffixText; if(entry->getTagString("suffixText.plain",suffixText)) content.Append(suffixText);
  }
  return content;
}


TQTaggable* TQTable::getEntryTags(unsigned int i, unsigned int j){
  // retrieve the table entry at row i and column j as a TQTaggable
  TQTaggable* entry = this->getEntryInternal(i,j);
  if(entry) return new TQTaggable(entry);
  return NULL;
}



TString TQTable::getEntryVerbatim(unsigned int i, unsigned int j){
  // retrieve the table entry at row i and column j
  // as verbatim text
  TQTaggable* entry = this->getEntryInternal(i,j);
  //@tag: [content.verbatim] This tag contains the verbatim content of the corresponding cell.
  if(entry) return entry->getTagStringDefault("content.verbatim","");
  return "";
}

TString TQTable::getEntryUnicode(unsigned int i, unsigned int j){
  // retrieve the table entry at row i and column j
  // in Unicode-Format
  return this->getEntryPlain(i,j,true);
}

TString TQTable::getEntryASCII(unsigned int i, unsigned int j){
  // retrieve the table entry at row i and column j
  // in ASCII-Format
  return this->getEntryPlain(i,j,false);
}

TString TQTable::getEntryHTML(unsigned int i, unsigned int j){
  // retrieve the table entry at row i and column j
  // in HTML format
  TQTaggable* entry = this->getEntryInternal(i,j);
  TString tag = (i==0 ? "th" : "td");
  TString content = entry ? entry->getTagStringDefault("content.html", TQTable::formatEntryContents(entry, "html")) : TQTable::formatEntryContents(entry, "html");
  TString style = "";
  style.Append("text-align:"); style.Append(this->getColAlignHTML(j)); style.Append("; ");
  if(i < this->hlines.size() && this->hlines[i] > 0){
    if(this->hlines[i] == 1) style.Append(" border-top: 1px black solid; ");
    else style.Append(" border-top: 3px black double; ");
  }
  if(j < this->vlines.size() && this->vlines[j] > 0){
    if(this->vlines[j] == 1) style.Append(" border-left: 1px black solid; ");
    else style.Append(" border-left: 3px black double; ");
  }
  TString tooltip = "";
  if(entry){
    TString textcolor = ""; if(entry->getTagString("textcolor",textcolor)) style.Append(" color:"+textcolor+"; ");
    TString cellcolor = ""; if (entry->getTagString("cellcolor",cellcolor)) style.Append(" background-color: "+cellcolor+"; ");
    //@tag: [italic,bold,smallcaps] These entry tags determine if the cell content is displayed in italics/bold/smallcaps in HTML and LaTeX output.
    if(entry->getTagBoolDefault("italic",false)) style.Append(" font-shape:italic; ");
    if(entry->getTagBoolDefault("bold",false)) style.Append(" font-weight:bold; ");
    if(entry->getTagBoolDefault("smallcaps",false)) style.Append(" font-variant:small-caps; ");
    //@tag: [allowlinewrap] This entry/object tag controlls if cell contents may be wrapped over multiple lines in HTML output, default: false. Entry tag overrides object tag.
    bool allowlinewrap = entry->getTagBoolDefault("allowlinewrap",this->getTagBoolDefault("allowlinewrap",false));
    //@tag: [style.padding.vertical,~.horizontal] These object tags determine the left and right / top and bottom paddings of the table in HTML output, default: vertical: "0px", horizontal: "5px".
    TString vpadding = this->getTagStringDefault("style.padding.vertical", "0px");
    TString hpadding = this->getTagStringDefault("style.padding.horizontal", "5px");
    style.Append(" padding-left:"+hpadding +"; padding-right: "+hpadding+ "; padding-top:"+vpadding+"; padding-bottom:"+vpadding+";");
    if(!allowlinewrap) style.Append(" white-space: nowrap; ");
    //@tag: [tooltip] This entry tag is added to the cell in HTML output as a tool tip.
    if(entry->getTagString("tooltip",tooltip)){ tooltip.Prepend("title=\""); tooltip.Append("\" "); };
  }
  if(entry){
    //@tag: [prefixText.html,suffixText.html] This entry tag determines the text to be prepended/appended to the cell entry for HTML output
    TString prefixText; if(entry->getTagString("prefixText.html",prefixText)) content.Prepend(prefixText);
    TString suffixText; if(entry->getTagString("suffixText.html",suffixText)) content.Append(suffixText);
  }
  content.Append("</"+tag+">");
  content.Prepend("<"+tag+" "+tooltip+"style=\""+style+"\">");
  return content;
}


TString TQTable::makeExpSuffix(int exponent, const TString& format, bool useSIsuffix){
  // create the exponential suffix associated with the given exponent
  // in the given format ('ascii', 'unicode', 'latex', 'html', ...)
  // if useSIsuffix is true, SI suffices (... m, k, M, G, ...) will be used instead
  if(useSIsuffix) return TQStringUtils::getSIsuffix(exponent,format);
  if(format == "unicode"){
    return "*10"+TQStringUtils::makeUnicodeSuperscript(TString::Format("%d",exponent));
  }
  //@tag: [format.expsuffix.<format>] This object tag determines how exponential notation is represented for format <format>. The default pattern is "×10^%d".
  TString pattern = this->getTagStringDefault("format.expsuffix."+format,"×10^%d");
  return TString::Format(pattern.Data(),exponent);
}

void TQTable::setup(){
  // initialize some sensible formatting defaults
  //
  // the formatting is saved as tags on the TQTable object and is accessed on writing the data
  // the values can be accessed and changed easily
  //
  // the tag naming convention is as follows:
  // formatting is controled by
  // format.$OBJECT.$FORMAT
  // where $OBJECT refers to the object to be formatted, e.g.
  // expsuffix  : exponential suffix, e.g. '*10^7'
  // integer  : integer numbers
  // double  : floating point numbers
  // integerWithSuffix : integer numbers with suffix, e.g. 3*10^7
  // doubleWithSuffix : floating point numbers with suffix, e.g. 3.5*10^7
  // doubleAndUncertainty : floating point numbers with uncertainty, e.g. 3.5 +/- 0.2
  // doubleAndUncertaintyWithSuffix : floating point numbers with uncertainty and suffix, e.g. (3.5 +/- 0.2)*10^7
  // doubleWithSuffixAndUncertaintyWithSuffix : floating point numbers with uncertainty and suffix, e.g. 3.5*10^7 +/- 0.2*10^7
  // doubleAndRelativeUncertainty : floating point numbers with relative uncertainty, e.g. 3.5 +/- 5%
  // doubleWithSuffixAndRelativeUncertainty : floating point numbers with suffix and relative uncertainty, e.g. 3.5*10^7 +/- 5%
  // symbols are controled by
  // symbols.$SYMBOL.$FORMAT
  // where $SYMBOL refers to the symbol to be displayed, e.g.,
  // posInf : symbol used for positively infinite numbers
  // negInf : symbol used for negatively infinite numbers
  // NaN : symbol used for invalid numerical expressions (NaN)
  // in each case, $FORMAT refers to any of the supported output formats, that is
  // latex, html, ascii, unicode
  DEBUGclass("setup called");
  //@tag: [symbols.<symbol>.<format>] Symbol to be used for format <format>, when <symbol> is encountered. Defaults are "Nan", "inf" and "-inf". TQTable::setup() sets format specific symbols, which are (LaTeX/HTML/unicode/ASCII defaults): NaN ("\\xmark" / "&#x2717;" / U+2717 / "NaN"), posInf ("\\ensuremath{\\infty}" / "&infin;" / U+221E / "inf"), negInf ("-\\ensuremath{\\infty}" / "-&infin;" / "-"+ U+221E / "-inf")
  this->setTagString("format.expsuffix.latex", "\\times 10^{%d}");
  this->setTagString("format.integer.latex",  "\\ensuremath{%d}");
  this->setTagString("format.double.latex",  "\\ensuremath{%.$(ndigits)f}");
  //@tag: [format.<type>WithSuffix.<format>, format.doubleWithSuffixAndRelativeUncertainty.<format>, format.doubleWithSuffixAndUncertaintyWithSuffix.<format>] This object tag controls the format how numbers with suffixes are printed. <format> is any of "latex","html","ascii","unicode". <type> is either "double" or "integer". TQTable::setup() sets sensible format settings, if it is not called, defaults may vary.
  this->setTagString("format.integerWithSuffix.latex", "\\ensuremath{%d%s}");
  this->setTagString("format.doubleWithSuffix.latex", "\\ensuremath{%.$(ndigits)f%s}");
  this->setTagString("format.integerAndUncertainty.latex", "\\ensuremath{%d\\pm %d}");
  this->setTagString("format.integerAndSplitUncertainties.latex", "\\ensuremath{%d\\pm %d(\\mathrm{stat})\\pm %d(\\mathrm{sys})}");
  this->setTagString("format.doubleAndUncertainty.latex", "\\ensuremath{%.$(ndigits)f\\pm %.$(ndigits)f}");
  this->setTagString("format.doubleAndSplitUncertainties.latex", "\\ensuremath{%.$(ndigits)f\\pm %.$(ndigits)f (\\mathrm{stat})\\pm %.$(ndigits)f (\\mathrm{sys})}");
  this->setTagString("format.doubleAndUncertaintyWithSuffix.latex", "\\ensuremath{(%.$(ndigits)f\\pm %.$(ndigits)f)%s}");
  this->setTagString("format.doubleAndSplitUncertaintiesWithSuffix.latex", "\\ensuremath{(%.$(ndigits)f\\pm %.$(ndigits)f\\pm %.$(ndigits)f)%s}");
  this->setTagString("format.doubleWithSuffixAndUncertaintyWithSuffix.latex","\\ensuremath{%.$(ndigits)f%s\\pm %.$(ndigits)f%s}");
  this->setTagString("format.doubleWithSuffixAndSplitUncertaintiesWithSuffix.latex","\\ensuremath{%.$(ndigits)f%s\\pm %.$(ndigits)f%s\\pm %.$(ndigits)f%s}");
  this->setTagString("format.doubleAndRelativeUncertainty.latex", "\\ensuremath{%.$(ndigits)f\\pm %.$(ndigits)f%%}");
  this->setTagString("format.doubleAndRelativeSplitUncertainties.latex", "\\ensuremath{%.$(ndigits)f\\pm %.$(ndigits)f%% (\\mathrm{stat}) \\pm %.$(ndigits)f%% (\\mathrm{sys})}");
  this->setTagString("format.doubleWithSuffixAndRelativeUncertainty.latex", "\\ensuremath{%.$(ndigits)f%s\\pm %.$(ndigits)f%%}");
  this->setTagString("format.doubleWithSuffixAndRelativeSplitUncertainties.latex", "\\ensuremath{%.$(ndigits)f%s\\pm %.$(ndigits)f%% (\\mathrm{stat}) \\pm %.$(ndigits)f%% (\\mathrm{sys})}");

  this->setTagString("symbols.posInf.latex","\\ensuremath{\\infty}");
  this->setTagString("symbols.negInf.latex","-\\ensuremath{\\infty}");
  this->setTagString("symbols.NaN.latex","\\xmark");

  this->setTagString("format.integer.unicode",  "%d");
  this->setTagString("format.double.unicode",  "%.$(ndigits)f");
  this->setTagString("format.integerWithSuffix.unicode", "%d%s");
  this->setTagString("format.doubleWithSuffix.unicode", "%.$(ndigits)f%s");
  this->setTagString("format.integerAndUncertainty.unicode", "%d ± %d");
  this->setTagString("format.integerAndSplitUncertainties.unicode", "%d ± %d(stat) ± %d(sys)");
  this->setTagString("format.doubleAndUncertainty.unicode", "%.$(ndigits)f ± %.$(ndigits)f");
  this->setTagString("format.doubleAndSplitUncertainties.unicode", "%.$(ndigits)f ± %.$(ndigits)f (stat) ± %.$(ndigits)f (sys)");
  this->setTagString("format.doubleAndUncertaintyWithSuffix.unicode", "(%.$(ndigits)f ± %.$(ndigits)f)%s");
  this->setTagString("format.doubleAndSplitUncertaintiesWithSuffix.unicode", "(%.$(ndigits)f ± %.$(ndigits)f%s ± %.$(ndigits)f)%s");
  this->setTagString("format.doubleWithSuffixAndUncertaintyWithSuffix.unicode","%.$(ndigits)f%s ± %.$(ndigits)f%s");
  this->setTagString("format.doubleWithSuffixAndSplitUncertaintiesWithSuffix.unicode","%.$(ndigits)f%s ± %.$(ndigits)f%s ± %.$(ndigits)f%s");
  this->setTagString("format.doubleAndRelativeUncertainty.unicode", "%.$(ndigits)f ± %.$(ndigits)f%%");
  this->setTagString("format.doubleAndRelativeSplitUncertainties.unicode", "%.$(ndigits)f ± %.$(ndigits)f%% (stat) ± %.$(ndigits)f%% (sys)");
  this->setTagString("format.doubleWithSuffixAndRelativeUncertainty.unicode", "%.$(ndigits)f%s ± %.$(ndigits)f%%");
  this->setTagString("format.doubleWithSuffixAndRelativeSplitUncertainties.unicode", "%.$(ndigits)f%s ± %.$(ndigits)f%% (stat) ± %.$(ndigits)f%% (sys)");

  this->setTagString("symbols.posInf.unicode","∞");
  this->setTagString("symbols.negInf.unicode","-∞");
  this->setTagString("symbols.NaN.unicode","✘");

  this->setTagString("format.integer.ascii",  "%d");
  this->setTagString("format.double.ascii",  "%.$(ndigits)f");
  this->setTagString("format.integerWithSuffix.ascii", "%d%s");
  this->setTagString("format.doubleWithSuffix.ascii", "%.$(ndigits)f%s");
  this->setTagString("format.integerAndUncertainty.ascii", "%d +/- %d");
  this->setTagString("format.integerAndSplitUncertainties.ascii", "%d +/- %d(stat) +/- %d(sys)");
  this->setTagString("format.doubleAndUncertainty.ascii", "%.$(ndigits)f +/- %.$(ndigits)f");
  this->setTagString("format.doubleAndSplitUncertainties.ascii", "%.$(ndigits)f +/- %.$(ndigits)f (stat) +/- %.$(ndigits)f (sys)");
  this->setTagString("format.doubleAndUncertaintyWithSuffix.ascii", "(%.$(ndigits)f +/- %.$(ndigits)f)%s");
  this->setTagString("format.doubleAndSplitUncertaintiesWithSuffix.ascii", "(%.$(ndigits)f +/- %.$(ndigits)f%s +/- %.$(ndigits)f)%s");
  this->setTagString("format.doubleWithSuffixAndUncertaintyWithSuffix.ascii","%.$(ndigits)f%s +/- %.$(ndigits)f%s");
  this->setTagString("format.doubleWithSuffixAndSplitUncertaintiesWithSuffix.ascii","%.$(ndigits)f%s +/- %.$(ndigits)f%s +/- %.$(ndigits)f%s");
  this->setTagString("format.doubleAndRelativeUncertainty.ascii", "%.$(ndigits)f +/- %.$(ndigits)f%%");
  this->setTagString("format.doubleAndRelativeSplitUncertainties.ascii", "%.$(ndigits)f +/- %.$(ndigits)f%% (stat) +/- %.$(ndigits)f%% (sys)");
  this->setTagString("format.doubleWithSuffixAndRelativeUncertainty.ascii", "%.$(ndigits)f%s +/- %.$(ndigits)f%%");
  this->setTagString("format.doubleWithSuffixAndRelativeSplitUncertainties.ascii", "%.$(ndigits)f%s +/- %.$(ndigits)f%% (stat) +/- %.$(ndigits)f%% (sys)");

  this->setTagString("symbols.posInf.ascii","inf");
  this->setTagString("symbols.negInf.ascii","-inf");
  this->setTagString("symbols.NaN.ascii","NaN");

  this->setTagString("format.expsuffix.html", "&times;10<sup>%d</sup>");
  this->setTagString("format.integer.html",  "%d");
  this->setTagString("format.double.html",  "%.$(ndigits)f");
  this->setTagString("format.integerWithSuffix.html", "%d%s");
  this->setTagString("format.doubleWithSuffix.html", "%.$(ndigits)f%s");
  this->setTagString("format.integerAndUncertainty.html", "%d &plusmn; %d");
  this->setTagString("format.integerAndSplitUncertainties.html", "%d &plusmn %d(stat) &plusmn %d(sys)");
  this->setTagString("format.doubleAndUncertainty.html", "%.$(ndigits)f &plusmn; %.$(ndigits)f");
  this->setTagString("format.doubleAndSplitUncertainties.html", "%.$(ndigits)f &plusmn %.$(ndigits)f (stat) &plusmn %.$(ndigits)f (sys)");
  this->setTagString("format.doubleAndUncertaintyWithSuffix.html", "(%.$(ndigits)f &plusmn; %.$(ndigits)f)%s");
  this->setTagString("format.doubleAndSplitUncertaintiesWithSuffix.html", "(%.$(ndigits)f &plusmn %.$(ndigits)f%s &plusmn %.$(ndigits)f)%s");
  this->setTagString("format.doubleWithSuffixAndUncertaintyWithSuffix.html","%.$(ndigits)f%s &plusmn; %.$(ndigits)f%s");
  this->setTagString("format.doubleWithSuffixAndSplitUncertaintiesWithSuffix.html","%.$(ndigits)f%s &plusmn %.$(ndigits)f%s &plusmn %.$(ndigits)f%s");
  this->setTagString("format.doubleAndRelativeUncertainty.html", "%.$(ndigits)f &plusmn; %.$(ndigits)f%%");
  this->setTagString("format.doubleAndRelativeSplitUncertainties.html", "%.$(ndigits)f &plusmn %.$(ndigits)f%% (stat) &plusmn %.$(ndigits)f%% (sys)");
  this->setTagString("format.doubleWithSuffixAndRelativeUncertainty.html", "%.$(ndigits)f%s &plusmn; %.$(ndigits)f%%");
  this->setTagString("format.doubleWithSuffixAndRelativeSplitUncertainties.html", "%.$(ndigits)f%s &plusmn %.$(ndigits)f%% (stat) &plusmn %.$(ndigits)f%% (sys)");

  this->setTagString("symbols.posInf.html","&infin;");
  this->setTagString("symbols.negInf.html","-&infin;");
  this->setTagString("symbols.NaN.html","&#x2717;");
}


TString TQTable::formatEntryContents(TQTaggable* entry, const TString& format){
  // format the entry contents in the given object according to the predefined formatting
  // this function will make use of the formatting tags set previously
  if(!entry) return "";
  if(entry->hasTag("content.value")){
    if(entry->tagIsOfTypeInteger("content.value")){
      int val = entry->getTagIntegerDefault("content.value",0);
      int exponent = val == 0 ? 0 : floor(log10((double)val)/3)*3;
      //@tag: [format.useExponentialNotation] This object tag determines if exponential notation should be used, default: false.
      if((exponent != 0) && (this->getTagBoolDefault("format.useExponentialNotation",false))){
        DEBUGclass("using exponential notation (int): exponent=%d", exponent);
        //@tag: [format.nSignificantDigits] This object tag determines the number of significant digits shown in the table, default: 2
        int nDigits = entry->getTagIntegerDefault("format.nSignificantDigits",this->getTagIntegerDefault("format.nSignificantDigits",2));
        double roundVal = TQUtils::round(double(val)/pow(10,exponent),nDigits);
        //@tag: [format.useSIsuffix] If this object tag is set to true, SI prefixes (m,k,M,...) are used as suffixes for numbers.
        TString suffix = this->makeExpSuffix(exponent,format,this->getTagBoolDefault("useSIsuffix",false));
        TString s = this->getTagStringDefault("format.doubleWithSuffix."+format,"%f%s");
        return TString::Format(s.Data(),roundVal,suffix.Data());
      } else {
        DEBUGclass("using standard notation (int): exponent=%d",exponent);
        //@tag: [format.integer] This object tag determines the standard format of integers, default: "%d"
        TString s = this->getTagStringDefault("format.integer."+format,"%d");
        return TString::Format(s.Data(),val);
      }
    } else {
      double val = entry->getTagDoubleDefault("content.value",0);
      int exponent = floor(log10(val)/3)*3;
      //for tag documentation see above
      int nDigits = entry->getTagIntegerDefault("format.nSignificantDigits",this->getTagIntegerDefault("format.nSignificantDigits",2));
      TString ndig = TString::Format("%d",nDigits);
      double roundVal = TQUtils::round(val/pow(10,exponent),nDigits);
      //@tag: [content.uncertainty] This entry tag contains the uncertainty of the numerical content of the corresponding cell.
      if(entry->hasTag("content.uncertainty") || entry->hasTag("content.statUncert")){
        double unc = entry->getTagDoubleDefault("content.uncertainty",0);
        double statUnc = entry->getTagDoubleDefault("content.statUncert",0);
        double sysUnc = entry->getTagDoubleDefault("content.sysUncert",0);
        bool splitUncertainties = entry->getTagDoubleDefault("format.splitUncertainties", this->getTagDoubleDefault("splitUncertainties", false));
        if(val != val) return this->getTagStringDefault("symbols.NaN."+format,"NaN");
        else if(val >= std::numeric_limits<double>::infinity()) return this->getTagStringDefault("symbols.posInf."+format,"inf");
        else if(val <= -std::numeric_limits<double>::infinity()) return this->getTagStringDefault("symbols.negInf."+format,"-inf");
        else if(val == 0) return "0";
        else if(this->getTagBoolDefault("format.pdg",false)){
          if((exponent != 0) && (this->getTagBoolDefault("format.useExponentialNotation",false))){
            return TQStringUtils::formatValueErrorPDG(val,unc,exponent,format);
          } else {
            return TQStringUtils::formatValueErrorPDG(val,unc,0,format);
          }
        } else {
          if((exponent != 0) && (this->getTagBoolDefault("format.useExponentialNotation",false))){
            DEBUGclass("using exponential notation (float): exponent=%d",exponent);
            double roundUnc = TQUtils::round(unc/pow(10,exponent),nDigits);
            double roundStatUnc = TQUtils::round(statUnc/pow(10,exponent),nDigits);
            double roundSysUnc = TQUtils::round(sysUnc/pow(10,exponent),nDigits);
            TString suffix = this->makeExpSuffix(exponent,format,this->getTagBoolDefault("useSIsuffix",false));
            //@tag: [format.useRelativeUncertainties] If this object tag is set to true, relative uncertainties are shown (entry value needs to be non-integer!).
            if(this->getTagBoolDefault("format.useRelativeUncertainties",false)){
              if (splitUncertainties) {
                TString s = this->getTagStringDefault("format.doubleWithSuffixAndSplitRelativeUncertainties."+format,"");
                s.ReplaceAll("$(ndigits)",ndig);
                return TString::Format(s.Data(),roundVal,suffix.Data(),statUnc/val*100,sysUnc/val*100);
              } else {
                TString s = this->getTagStringDefault("format.doubleWithSuffixAndRelativeUncertainty."+format,"%.$(ndigits)f%s +/-%.$(ndigits)f%%");
                s.ReplaceAll("$(ndigits)",ndig);
                return TString::Format(s.Data(),roundVal,suffix.Data(),unc/val*100);
              }
              //@tag: [format.useCommonSuffix] If this object tag is set to true, value and uncertainty are shown with a single suffix (e.g. (a +/- b) fb^{-1}). The format is set via format.doubleAndUncertaintyWithSuffix.<format> .
            } else if(this->getTagBoolDefault("format.useCommonSuffix",true)){
              if (splitUncertainties) {
                TString s = this->getTagStringDefault("format.doubleAndSplitUncertaintiesWithSuffix."+format,"");
                s.ReplaceAll("$(ndigits)",ndig);
                return TString::Format(s.Data(),roundVal,roundStatUnc,suffix.Data(),roundSysUnc,suffix.Data());
              } else {
                TString s = this->getTagStringDefault("format.doubleAndUncertaintyWithSuffix."+format,"(%.$(ndigits)f+/-%.$(ndigits)f)%s");
                s.ReplaceAll("$(ndigits)",ndig);
                return TString::Format(s.Data(),roundVal,roundUnc,suffix.Data());
              }
            } else {
              TString s = this->getTagStringDefault("format.doubleWithSuffixAndUncertaintyWithSuffix."+format,"%.$(ndigits)f%s+/-%.$(ndigits)f%s");
              s.ReplaceAll("$(ndigits)",ndig);
              return TString::Format(s.Data(),roundVal,suffix.Data(),roundUnc,suffix.Data());
            }
          } else {
            DEBUGclass("using standard notation (float): exponent=%d",exponent);
            if(this->getTagBoolDefault("format.useRelativeUncertainties",false)){
              if (splitUncertainties) {
                TString s = this->getTagStringDefault("format.doubleAndRelativeSplitUncertainties."+format,"");
                s.ReplaceAll("$(ndigits)",ndig);
                return TString::Format(s.Data(),val,statUnc/val*100,sysUnc/val*100);
              } else {
                TString s = this->getTagStringDefault("format.doubleAndRelativeUncertainty."+format,"%.$(ndigits)f+/-%.$(ndigits)f%%");
                s.ReplaceAll("$(ndigits)",ndig);
                return TString::Format(s.Data(),val,unc/val*100);
              }
            } else {
              if (splitUncertainties) {
                TString s = this->getTagStringDefault("format.doubleAndSplitUncertainties."+format,"");
                s.ReplaceAll("$(ndigits)",ndig);
                return TString::Format(s.Data(),val,statUnc,sysUnc);
              } else {
                TString s = this->getTagStringDefault("format.doubleAndUncertainty."+format,"%.$(ndigits)f+/-%.$(ndigits)f");
                s.ReplaceAll("$(ndigits)",ndig);
                return TString::Format(s.Data(),val,unc);
              }
            }
          }
        }
      } else {
        if((exponent != 0) && (this->getTagBoolDefault("format.useExponentialNotation",false))){
          TString suffix = this->makeExpSuffix(exponent,format,this->getTagBoolDefault("useSIsuffix",false));
          TString s = this->getTagStringDefault("format.doubleWithSuffix."+format,"%.$(ndigits)f%s");
          s.ReplaceAll("$(ndigits)",ndig);
          return TString::Format(s.Data(),roundVal,suffix.Data());
        } else {
          TString s = this->getTagStringDefault("format.double."+format,"%.$(ndigits)f");
          s.ReplaceAll("$(ndigits)",ndig);
          return TString::Format(s.Data(),val);
        }
      }
    }
  }
  return entry->getTagStringDefault("content."+format,"");
}



TString TQTable::getEntryLaTeX(unsigned int i, unsigned int j){
  // retrieve the table entry at row i and column j
  // in LaTeX format
  TQTaggable* entry = this->getEntryInternal(i,j);
  TString content = entry ? entry->getTagStringDefault("content.latex", TQTable::formatEntryContents(entry, "latex")) : TQTable::formatEntryContents(entry, "latex");
  if(content.IsNull()) return "";
  if(entry){
    //@tag: [prefixText.latex,suffixText.latex] This entry tag determines the text to be prepended/appended to the cell entry for LaTeX output
    TString prefixText; if(entry->getTagString("prefixText.latex",prefixText)) content.Prepend(prefixText);
    TString suffixText; if(entry->getTagString("suffixText.latex",suffixText)) content.Append(suffixText);
  }
  if(entry->hasTag("textcolor")){
    content.Append("}");
    content.Prepend("}{");
    content.Prepend(entry->getTagStringDefault("textcolor","black"));
    content.Prepend("\\textcolor{");
  }
  if (entry->hasTag("cellcolor")) {
    content.Prepend("}");
    content.Prepend(entry->getTagStringDefault("cellcolor","white"));
    content.Prepend("\\cellcolor{");
  }
  if(entry->getTagBoolDefault("italic",false)){
    content.Prepend("\\textit{");
    content.Append("}");
  }
  if(entry->getTagBoolDefault("bold",false)){
    content.Prepend("\\textbb{");
    content.Append("}");
  }
  if(entry->getTagBoolDefault("smallcaps",false)){
    content.Prepend("\\textsc{");
    content.Append("}");
  }
  if(entry->getTagBoolDefault("truetype",false)){
    content.Prepend("\\texttt{");
    content.Append("}");
  }  
  if(entry->hasTag("rotate")){
    content.Prepend("}{");
    content.Prepend(entry->getTagStringDefault("rotate","0"));
    content.Prepend("\\rotatecell{");
    content.Append("}");
  }
  return content;
}


int TQTable::setAllEntriesWhere(const TString& searchCol, const TString& searchVal, const TString& setCol, const TString& setVal, const TString& searchFormat, const TString& setFormat){
  // database function
  // find all rows where searchCol takes a value matching searchVal in searchFormat
  // in these rows, set setCol to setVal in setFormat
  unsigned int col1 = findColumn(searchCol);
  if(/*col1 < 0 ||*/ col1 > this->ncols){ //col1 is unsigned, hence >= 0
    ERROR("unable to find column '%s'",searchCol.Data());
  }
  unsigned int col2 = findColumn(setCol);
  if(/*col2 < 0 ||*/ col2 > this->ncols){ //col2 is unsigned, hence >= 0
    ERROR("unable to find column '%s'",setCol.Data());
  }
  int count = 0;
  for(unsigned int i=1; i<this->nrows; i++){
    TString val = this->getEntry(i,col1,searchFormat);
    if(TQStringUtils::matches(val,searchVal)){
      this->setEntry(i,col2,setVal,setFormat);
      count++;
    }
  }
  return count;
}



bool TQTable::setEntry(unsigned int i, unsigned int j, const TString& content, const TString& format){
  // set the table entry at row i and column j to the given content
  // input format can be specified with last argument and will be guessed automatically if left empty
  // contents will automatically be converted into all supported output formats
  // if you do not want this or want to edit individual representations
  // without afflicting other formats, please use
  // TQTable::setProperty( ... )
  DEBUGclass("setting content of cell %d/%d to '%s' (format=%s)",(int)i,(int)j,content.Data(),format.Data());
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(!entry) return false;
  this->setContent(entry,content,format);
  return true;
}

bool TQTable::setEntry(unsigned int i, unsigned int j, const char* content, const TString& format){
  // set the table entry at row i and column j to the given content
  // input format can be specified with last argument and will be guessed automatically if left empty
  // contents will automatically be converted into all supported output formats
  // if you do not want this or want to edit individual representations
  // without afflicting other formats, please use
  // TQTable::setProperty( ... )
  DEBUGclass("setting content of cell %d/%d to '%s' (format=%s)",(int)i,(int)j,content,format.Data());
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(!entry) return false;
  TString tmp(content);
  this->setContent(entry,tmp,format);
  return true;
}


bool TQTable::setEntryValue(unsigned int i, unsigned int j, double content){
  // set the table entry at row i and column j to the given numerical content
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(!entry) return false;
  entry->setTagDouble("content.value",content);
  return true;
}

double TQTable::getEntryValue(unsigned int i, unsigned int j, double defaultval){
  // get the table entry at row i and column j
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(!entry) return std::numeric_limits<double>::quiet_NaN();
  return entry->getTagDoubleDefault("content.value",defaultval);
}

bool TQTable::setEntryValueAndUncertainty(unsigned int i, unsigned int j, double value, double Uncertainty){
  // set the table entry at row i and column j to the given numerical content
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(!entry) return false;
  entry->setTagDouble("content.value",value);
  entry->setTagDouble("content.uncertainty",Uncertainty);
  return true;
}

bool TQTable::setEntryValueAndSplitUncertainties(unsigned int i, unsigned int j, double value, double statUncert, double sysUncert){
  // set the table entry at row i and column j to the given numerical content
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(!entry) return false;
  entry->setTagDouble("content.value",value);
  entry->setTagDouble("content.statUncert",statUncert);
  entry->setTagDouble("content.sysUncert",sysUncert);
  return true;
}

bool TQTable::setEntryValue(unsigned int i, unsigned int j, int content){
  // set the table entry at row i and column j to the given numerical content
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(!entry) return false;
  entry->setTagInteger("content.value",content);
  return true;
}


void TQTable::setAutoExpand(bool val){
  // (de)activate automatic table expansion
  this->autoExpand = val;
}
bool TQTable::getAutoExpand(){
  // retrieve activation status of automatic table expansion
  return this->autoExpand;
}

namespace {
  inline bool ge(unsigned int a, unsigned int b){
    return (a>=b) && (a!=(unsigned int)(-1));
  }
}

bool TQTable::expand(unsigned int i, unsigned int j){
  // expand the table to have at least i rows and j columns
  DEBUGclass("attempting to expand table from %i/%i to %i/%i",this->nrows,this->ncols,i,j);
  unsigned int newrows = std::max(i,(unsigned int)this->nrows);
  unsigned int newcols = std::max(j,(unsigned int)this->ncols);
  if(newcols > this->ncols  || newrows > this->nrows){
    DEBUGclass("preparing to move memory");
    TQTaggable** old = this->data;
    DEBUGclass("attempting to reallocate...");
    this->data = (TQTaggable**)malloc(newrows*newcols*sizeof(TQTaggable*));
    if(!this->data){
      throw std::bad_alloc();
    }
    DEBUGclass("initializing empty cells");
    for(unsigned int i=newrows-1; ge(i,this->nrows); --i){
      for(unsigned int j=newcols-1; ge(j,0); j--){
        this->data[i*newcols + j] = NULL;
      }
    }
    DEBUGclass("moving non-empty cells");
    for(unsigned int i=this->nrows-1; ge(i,0); --i){
      for(unsigned int j=newcols-1; ge(j,this->ncols); --j){
        this->data[i*newcols + j] = NULL;
      }
      for(unsigned int j=this->ncols-1; ge(j,0); --j){
        this->data[i*newcols + j] = old[i*this->ncols + j];
      }
    }
    if(old){
      if(manualAllocation) free(old);
      else delete[] old;
    }
    manualAllocation = true;
    this->nrows = newrows;
    this->ncols = newcols;
    this->nfields = this->nrows * this->ncols;
    DEBUGclass("expansion complete");
  }
  return true;
}

int TQTable::clear(){
  int val = 0;
  for(unsigned int i=0; i<this->nfields; i++){
    if(!this->data[i]) continue;
    delete this->data[i];
    val++;
  }
  if(manualAllocation) free(this->data);
  else delete[] this->data;
  this->nrows = 0;
  this->ncols = 0;
  this->nfields = 0;
  this->vlines.clear();
  this->hlines.clear();
  this->data = NULL;
  return val;
}

int TQTable::cleanup(){
  // clean the table, removing empty entries
  int n=0;
  for(unsigned int i=0; i<this->nfields; i++){
    if(!this->data[i]) continue;
    if(this->data[i]->hasMatchingTag("content.*")) continue;
    delete this->data[i];
    this->data[i] = NULL;
    n++;
  }
  return n;
}

bool TQTable::shrink(){
  // shrink the table, removing empty rows and columns
  DEBUGclass("shrink called");
  this->cleanup();
  std::vector<int> rowEmpty;
  unsigned int rows = 0;
  std::vector<int> colEmpty;
  unsigned int cols = 0;
  for(unsigned int i=0; i<this->nrows; i++){
    bool empty = true;
    for(unsigned int j=0; j<this->ncols; j++){
      if(this->data[i*this->ncols + j]) empty = false;
    }
    if(i < this->hlines.size()){
      // shift the line from [i] to [row]
      this->hlines[rows] = std::max(this->hlines[rows],this->hlines[i]);
      // avoid double-counting
      if(i>rows) this->hlines[i] = 0;
    }
    if(empty){
      rowEmpty.push_back(-1);
    } else {
      rowEmpty.push_back(rows);
      rows++;
    }
  }
  for(unsigned int j=0; j<this->ncols; j++){
    bool empty = true;
    for(unsigned int i=0; i<this->nrows; i++){
      if(this->data[i*this->ncols + j]) empty = false;
    }
    if(j < this->colAlign.size()) this->colAlign[cols] = this->colAlign[j];
    else if(cols < this->colAlign.size()) this->colAlign[cols] = this->getTagIntegerDefault("colAlign",10);
    if(j < this->vlines.size()){
      this->vlines[cols] = std::max(this->vlines[j],this->vlines[cols]);
      if(j!=cols) this->vlines[j] = 0;
    } else if(cols < this->vlines.size()) this->vlines[cols] = 0;
    if(empty){
      colEmpty.push_back(-1);
    } else {
      colEmpty.push_back(cols);
      cols++;
    }
  }
  if(rows == this->nrows && cols == this->ncols) return true;
  TQTaggable** old = this->data;
  this->data = (TQTaggable**)calloc(rows*cols,sizeof(TQTaggable*));
  if(!data) return false;
  for(unsigned int i=0; i<this->nrows; i++){
    for(unsigned int j=0; j<this->ncols; j++){
      if(rowEmpty[i] >= 0 && colEmpty[j] >= 0){
        this->data[rowEmpty[i]*cols + colEmpty[j]] = old[i*this->ncols + j];
      }
    }
  }
  if(manualAllocation) free(old);
  else delete[] old;
  manualAllocation = true;
  this->nrows = rows;
  this->ncols = cols;
  this->nfields = this->nrows * this->ncols;
  DEBUGclass("shrink done");
  return true;
}

bool TQTable::copyRow(unsigned int sourceRow, unsigned int targetRow, bool ignoreProperties) {
  // copy a full row

  if (sourceRow > this->nrows) {
    ERRORclass("unable to copy row with index '%d' to row with index '%d'!", sourceRow, targetRow);
    return 0;
  }
  for (size_t j=0; j < this->ncols; j++) {
    this->setEntry(targetRow, j, this->getEntry(sourceRow, j));
    if (!ignoreProperties) {
      TQTaggable* thisEntry = this->getEntryInternal(sourceRow,j);
      if (thisEntry)
        this->getEntryInternal(targetRow, j)->importTags(thisEntry->exportTagsAsString());
      else
        return false;
    }
  }
  return true;
}

void TQTable::clearRow(unsigned int row){
  // clear/delete the row with given index
  for(unsigned int j=0; j<this->ncols; j++){
    this->removeEntry(row,j);
  }
}

void TQTable::clearCol(unsigned int col){
  // clear/delete the column with given index
  for(unsigned int i=0; i<this->nrows; i++){
    this->removeEntry(i,col);
  }
}

bool TQTable::hasEntry(unsigned int i, unsigned int j){
  // check if entry at row i and column j exists
  TQTaggable* entry = this->getEntryInternal(i,j);
  if(!entry) return false;
  return true;
}

void TQTable::removeEntry(unsigned int i,unsigned int j){
  // remove entry at row i and column j
  if(i>= this->nrows || j>= this->ncols) return;
  if(this->data[i*this->ncols + j]){
    delete this->data[i*this->ncols + j];
    this->data[i*this->ncols + j] = NULL;
  }
}


bool TQTable::setProperty(unsigned int i, unsigned int j, const TString& key, const TString& value){
  // set a property/style tag for entry at row i and column j
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(entry) return entry->setTagString(key,value);
  return false;
}
bool TQTable::setProperty(unsigned int i, unsigned int j, const TString& key, const char* value){
  // set a property/style tag for entry at row i and column j
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(entry) return entry->setTagString(key,value);
  return false;
}
bool TQTable::setProperty(unsigned int i, unsigned int j, const TString& key, double value){
  // set a property/style tag for entry at row i and column j
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(entry) return entry->setTagDouble(key,value);
  return false;
}
bool TQTable::setProperty(unsigned int i, unsigned int j, const TString& key, int value){
  TQTaggable* entry = this->getEntryInternal(i,j,true);
  if(entry) return entry->setTagInteger(key,value);
  return false;
}
void TQTable::setColProperty(unsigned int j, const TString& key, const TString& value){
  // set a property/style tag for all entries in column j
  for(unsigned int i=0; i<this->nrows; i++){
    this->setProperty(i,j,key,value);
  }
}
void TQTable::setColProperty(unsigned int j, const TString& key, const char* value){
  // set a property/style tag for all entries in column j
  for(unsigned int i=0; i<this->nrows; i++){
    this->setProperty(i,j,key,value);
  }
}
void TQTable::setColProperty(unsigned int j, const TString& key, double value){
  // set a property/style tag for all entries in column j
  for(unsigned int i=0; i<this->nrows; i++){
    this->setProperty(i,j,key,value);
  }
}
void TQTable::setColProperty(unsigned int j, const TString& key, int value){
  // set a property/style tag for all entries in column j
  for(unsigned int i=0; i<this->nrows; i++){
    this->setProperty(i,j,key,value);
  }
}
void TQTable::setRowProperty(unsigned int i, const TString& key, const TString& value){
  // set a property/style tag for all entries in row i
  for(unsigned int j=0; j<this->ncols; j++){
    this->setProperty(i,j,key,value);
  }
}
void TQTable::setRowProperty(unsigned int i, const TString& key, const char* value){
  // set a property/style tag for all entries in row i
  for(unsigned int j=0; j<this->ncols; j++){
    this->setProperty(i,j,key,value);
  }
}
void TQTable::setRowProperty(unsigned int i, const TString& key, double value){
  // set a property/style tag for all entries in row i
  for(unsigned int j=0; j<this->ncols; j++){
    this->setProperty(i,j,key,value);
  }
}
void TQTable::setRowProperty(unsigned int i, const TString& key, int value){
  // set a property/style tag for all entries in row i
  for(unsigned int j=0; j<this->ncols; j++){
    this->setProperty(i,j,key,value);
  }
}


bool TQTable::write (const TString& fname, const TString& format, TQTaggable& tags){
  // write table data to the given file
  // format is specified explicitly
  // style is given via tags

  //@tag: [ensureDirectory] If this argument tag is set to true, directories on the file system are be created when required to write to the specified output file(path). Default: false.
  if(tags.getTagBoolDefault("ensureDirectory",false)) TQUtils::ensureDirectoryForFile(fname);
  std::ofstream out(fname);
  if(!out.is_open()) return false;
  return this->print(&out,format,tags);
}

bool TQTable::write (const TString& fname, TQTaggable& tags){
  // write table data to the given file
  // format and style can be specified with tags
  if(tags.getTagBoolDefault("ensureDirectory",false)) TQUtils::ensureDirectoryForFile(fname);

  TString format = "plain";
  if(fname.Contains(".") && !tags.getTagString("format",format)){
    size_t last = fname.Last('.');
    format = fname(last+1,fname.Length()-last);
  }
  std::ofstream out(fname);
  if(!out.is_open()) return false;
  return this->print(&out,format,tags);
}
bool TQTable::writeCSV (const TString& fname, TQTaggable& tags){
  // write table data to the given file in CSV format
  // format and style can be further specified with tags
  if(tags.getTagBoolDefault("ensureDirectory",false)) TQUtils::ensureDirectoryForFile(fname);
  std::ofstream out(fname);
  if(!out.is_open()) return false;
  return this->printCSV(&out,tags);
}
bool TQTable::writeHTML (const TString& fname, TQTaggable& tags){
  // write table data to the given file in HTML format
  // format and style can be further specified with tags
  if(tags.getTagBoolDefault("ensureDirectory",false)) TQUtils::ensureDirectoryForFile(fname);
  std::ofstream out(fname);
  if(!out.is_open()) return false;
  return this->printHTML(&out,tags);
}
bool TQTable::writeLaTeX(const TString& fname, TQTaggable& tags){
  // write table data to the given file in LaTeX format
  // format and style can be further specified with tags
  if(tags.getTagBoolDefault("ensureDirectory",false)) TQUtils::ensureDirectoryForFile(fname);
  std::ofstream out(fname);
  if(!out.is_open()) return false;
  return this->printLaTeX(&out,tags);
}
bool TQTable::writePlain(const TString& fname, TQTaggable& tags){
  // write table data to the given file in plain ascii/unicode art format
  // format and style can be further specified with tags
  if(tags.getTagBoolDefault("ensureDirectory",false)) TQUtils::ensureDirectoryForFile(fname);
  std::ofstream out(fname);
  if(!out.is_open()) return false;
  return this->printPlain(&out,tags);
}



bool TQTable::print (std::ostream* out, TQTaggable* tags){ if(tags) return this->print(out,*tags); return this->print(out,"format=unicode"); }
bool TQTable::printCSV (std::ostream* out, TQTaggable* tags){ if(tags) return this->printCSV(out,*tags); return this->printCSV(out,"format=csv"); }
bool TQTable::printHTML (std::ostream* out, TQTaggable* tags){ if(tags) return this->printHTML(out,*tags); return this->printHTML(out,"format=html"); }
bool TQTable::printLaTeX(std::ostream* out, TQTaggable* tags){ if(tags) return this->printLaTeX(out,*tags); return this->printLaTeX(out,"format=latex"); }
bool TQTable::printPlain(std::ostream* out, TQTaggable* tags){ if(tags) return this->printPlain(out,*tags); return this->printPlain(out,"format=unicode"); }
bool TQTable::print (std::ostream* out, const TString& tags){ TQTaggable tmp(tags); return this->print (out,tmp); }
bool TQTable::printCSV (std::ostream* out, const TString& tags){ TQTaggable tmp(tags); return this->printCSV (out,tmp); }
bool TQTable::printHTML (std::ostream* out, const TString& tags){ TQTaggable tmp(tags); return this->printHTML (out,tmp); }
bool TQTable::printLaTeX(std::ostream* out, const TString& tags){ TQTaggable tmp(tags); return this->printLaTeX(out,tmp); }
bool TQTable::printPlain(std::ostream* out, const TString& tags){ TQTaggable tmp(tags); return this->printPlain(out,tmp); }
bool TQTable::print (std::ostream* out, const char* tags){ TQTaggable tmp(tags); return this->print (out,tmp); }
bool TQTable::printCSV (std::ostream* out, const char* tags){ TQTaggable tmp(tags); return this->printCSV (out,tmp); }
bool TQTable::printHTML (std::ostream* out, const char* tags){ TQTaggable tmp(tags); return this->printHTML (out,tmp); }
bool TQTable::printLaTeX(std::ostream* out, const char* tags){ TQTaggable tmp(tags); return this->printLaTeX(out,tmp); }
bool TQTable::printPlain(std::ostream* out, const char* tags){ TQTaggable tmp(tags); return this->printPlain(out,tmp); }

bool TQTable::print (TQTaggable& tags) { return this->print (&std::cout,tags); }
bool TQTable::printCSV (TQTaggable& tags) { return this->printCSV (&std::cout,tags); }
bool TQTable::printHTML (TQTaggable& tags) { return this->printHTML (&std::cout,tags); }
bool TQTable::printLaTeX(TQTaggable& tags) { return this->printLaTeX(&std::cout,tags); }
bool TQTable::printPlain(TQTaggable& tags) { return this->printPlain(&std::cout,tags); }
bool TQTable::print (TQTaggable* tags) { return this->print (&std::cout,tags); }
bool TQTable::printCSV (TQTaggable* tags) { return this->printCSV (&std::cout,tags); }
bool TQTable::printHTML (TQTaggable* tags) { return this->printHTML (&std::cout,tags); }
bool TQTable::printLaTeX(TQTaggable* tags) { return this->printLaTeX(&std::cout,tags); }
bool TQTable::printPlain(TQTaggable* tags) { return this->printPlain(&std::cout,tags); }
bool TQTable::print (const TString& tags) { return this->print (&std::cout,tags); }
bool TQTable::printCSV (const TString& tags) { return this->printCSV (&std::cout,tags); }
bool TQTable::printHTML (const TString& tags) { return this->printHTML (&std::cout,tags); }
bool TQTable::printLaTeX(const TString& tags) { return this->printLaTeX(&std::cout,tags); }
bool TQTable::printPlain(const TString& tags) { return this->printPlain(&std::cout,tags); }
bool TQTable::print (const char* tags) { return this->print (&std::cout,tags); }
bool TQTable::printCSV (const char* tags) { return this->printCSV (&std::cout,tags); }
bool TQTable::printHTML (const char* tags) { return this->printHTML (&std::cout,tags); }
bool TQTable::printLaTeX(const char* tags) { return this->printLaTeX(&std::cout,tags); }
bool TQTable::printPlain(const char* tags) { return this->printPlain(&std::cout,tags); }

bool TQTable::write (const TString& fname, const TString& tags){ TQTaggable tmp(tags); return this->write (fname,tmp); }
bool TQTable::writeCSV (const TString& fname, const TString& tags){ TQTaggable tmp(tags); return this->writeCSV (fname,tmp); }
bool TQTable::writeHTML (const TString& fname, const TString& tags){ TQTaggable tmp(tags); return this->writeHTML (fname,tmp); }
bool TQTable::writeLaTeX(const TString& fname, const TString& tags){ TQTaggable tmp(tags); return this->writeLaTeX(fname,tmp); }
bool TQTable::writePlain(const TString& fname, const TString& tags){ TQTaggable tmp(tags); return this->writePlain(fname,tmp); }
bool TQTable::write (const TString& fname, const char* tags){ TQTaggable tmp(tags); return this->write (fname,tmp); }
bool TQTable::writeCSV (const TString& fname, const char* tags){ TQTaggable tmp(tags); return this->writeCSV (fname,tmp); }
bool TQTable::writeHTML (const TString& fname, const char* tags){ TQTaggable tmp(tags); return this->writeHTML (fname,tmp); }
bool TQTable::writeLaTeX(const TString& fname, const char* tags){ TQTaggable tmp(tags); return this->writeLaTeX(fname,tmp); }
bool TQTable::writePlain(const TString& fname, const char* tags){ TQTaggable tmp(tags); return this->writePlain(fname,tmp); }
bool TQTable::write (const TString& fname, TQTaggable* tags){ if(tags) return this->write(fname,*tags); return this->write(fname,""); }
bool TQTable::writeCSV (const TString& fname, TQTaggable* tags){ if(tags) return this->writeCSV(fname,*tags); return this->writeCSV(fname,"format=csv"); }
bool TQTable::writeHTML (const TString& fname, TQTaggable* tags){ if(tags) return this->writeHTML(fname,*tags); return this->write(fname,"format=html"); }
bool TQTable::writeLaTeX(const TString& fname, TQTaggable* tags){ if(tags) return this->writeLaTeX(fname,*tags); return this->write(fname,"format=latex"); }
bool TQTable::writePlain(const TString& fname, TQTaggable* tags){ if(tags) return this->writePlain(fname,*tags); return this->write(fname,"format=unicode"); }



bool TQTable::setContent(TQTaggable* entry,const TString& content, TString prior){
  // set the content tags on a given object
  // this function will automatically convert the text into all supported formats
  // this is an internal function accessed by TQTable::setEntry( ... )
  if(!entry) return false;
  entry->setGlobalOverwrite(prior.IsNull());
  if(prior.IsNull() || TQStringUtils::equal(prior,"verbatim")) prior = TQStringUtils::findFormat(content);
  prior.ToLower();
  //tag documentation at first usage.
  entry->setTagString("content.verbatim",content);
  if(prior == "unicode"){
    //@tag: [content.ascii] This entry tag contains the ascii content of the corresponding cell.
    entry->setTagString("content.ascii",TQStringUtils::makeASCII(content));
    //@tag: [content.latex] This entry tag contains the LaTeX content of the corresponding cell.
    entry->setTagString("content.latex",TQStringUtils::convertPlain2LaTeX(content));
    //@tag: [content.html] This entry tag contains the HTML content of the corresponding cell.
    entry->setTagString("content.html",TQStringUtils::convertPlain2HTML(content));
    entry->setGlobalOverwrite(true);
    //@tag: [content.unicode] This entry tag contains the unicode content of the corresponding cell.
    entry->setTagString("content.unicode",content);
    return true;
  }
  if(prior == "ascii"){
    entry->setTagString("content.unicode",content);
    entry->setTagString("content.latex",TQStringUtils::convertPlain2LaTeX(content));
    entry->setTagString("content.html",TQStringUtils::convertPlain2HTML(content));
    entry->setGlobalOverwrite(true);
    entry->setTagString("content.ascii",content);
    return true;
  }
  if(prior == "latex"){
    entry->setTagString("content.unicode",TQStringUtils::convertLaTeX2Plain(content,true));
    entry->setTagString("content.ascii",TQStringUtils::convertLaTeX2Plain(content,false));
    entry->setTagString("content.html",TQStringUtils::convertLaTeX2HTML(content));
    entry->setGlobalOverwrite(true);
    entry->setTagString("content.latex",content);
    return true;
  }
  if(prior == "html"){
    entry->setTagString("content.unicode",TQStringUtils::convertHTML2Plain(content,true));
    entry->setTagString("content.ascii",TQStringUtils::convertHTML2Plain(content,false));
    entry->setTagString("content.latex",TQStringUtils::convertHTML2LaTeX(content));
    entry->setGlobalOverwrite(true);
    entry->setTagString("content.html",content);
    return true;
  }
  if(prior == "roottex"){
    entry->setTagString("content.unicode",TQStringUtils::convertROOTTeX2Plain(content,true));
    entry->setTagString("content.ascii",TQStringUtils::convertROOTTeX2Plain(content,false));
    entry->setTagString("content.latex",TQStringUtils::convertROOTTeX2LaTeX(content));
    entry->setTagString("content.html", TQStringUtils::convertROOTTeX2HTML(content));
    entry->setGlobalOverwrite(true);
    return true;
  }
  entry->setGlobalOverwrite(true);
  return false;
}


TString TQTable::getRowAsCSV(int row, const TString& sep){
  // retrieve the given row as a CSV formatted string
  TString retval;
  if((unsigned int)row > this->nrows) return retval;
  for(unsigned int i=0; i<this->ncols; i++){
    retval.Append(this->getEntryASCII(row,i));
    if(i+1 < this->ncols) retval.Append(sep);
  }
  return retval;
}


TString TQTable::getDetails(){
  // retrieve table details as a string
  return TString::Format("%d rows, %d columns",(int)(this->nrows), (int)(this->ncols));
}

void TQTable::dump(){
  // dump all essential data members to the console
  std::cout << this->GetName() << ": " << this->getDetails() << std::endl;;
  if(this->data){
    std::cout << "table data is:" << std::endl;
    for(unsigned int i=0; i<this->nfields; i++){
      std::cout << TQStringUtils::fixedWidth(TString::Format("%d",(int)i),10,"r") << ": ";
      if(this->data[i]) std::cout << this->data[i]->exportTagsAsString();
      else std::cout << "(empty)";
      std::cout << std::endl;
    }
  } else {
    std::cout << "table data is NULL" << std::endl;
  }
}


const TList& TQTable::makeTList(const TString& sep){
  // convert to a TList
  TList* l = this->makeTListPtr(sep);
  return *l;
}


void TQTable::addToListContents(TList* l, const TString& sep){
  // append contents to a TList
  for(unsigned int i=1; i<this->nrows; i++){
    l->Add(new TObjString(this->getRowAsCSV(i,sep)));
  }
}

void TQTable::setListContents(TList* l, const TString& sep){
  // set the contents of a TList to the contents of this table
  l->Clear();
  l->SetName(this->GetName());
  this->addToListContents(l,sep);
}

TList* TQTable::makeTListPtr(const TString& sep){
  // convert to a TList
  TList* l = new TList();
  this->setListContents(l,sep);
  return l;
}

void TQTable::setFromTList(TList& l){
  // import data from a TList
  this->clear();
  this->expand(l.GetEntries(),1);
  for(unsigned int i=0; i<(unsigned int)l.GetEntries(); i++){
    this->setEntry(i,0,l.At(i)->GetName());
  }
}

void TQTable::setFromTList(TList* l){
  // import data from a TList
  this->clear();
  if(l){
    this->expand(l->GetEntries(),1);
    for(unsigned int i=0; i<(unsigned int)l->GetEntries(); i++){
      this->setEntry(i,0,l->At(i)->GetName());

    }
  }
}

std::map<TString,TString> TQTable::getMap(const TString& key, const TString& value, const TString& keyformat, const TString& valformat){
  // retrieve a std::map, mapping entries of column labeled 'key' to entries of column labeled 'value'
  // formatting can be controlled with 'keyformat' and 'valformat'
  int keyidx = this->findColumn(key);
  int validx = this->findColumn(value);
  if(keyidx < 0){
    ERRORclass("unable to generate map: cannot find column '%s'!",key.Data());
  }
  if(validx < 0){
    ERRORclass("unable to generate map: cannot find column '%s'!",value.Data());
  }
  return this->getMap(keyidx,validx,keyformat,valformat,true);
}

std::map<TString,TString> TQTable::getMap(unsigned int keyidx, unsigned int validx, const TString& keyformat, const TString& valformat, bool skipfirstline){
  // retrieve a std::map, mapping entries of column keyidx to entries of column validx
  // formatting can be controlled with 'keyformat' and 'valformat'
  // if skipfirstline is true, the first row will be skipped
  std::map<TString,TString> map;
  for(unsigned int i=skipfirstline; i<this->nrows; i++){
    TString k = this->getEntry(i,keyidx,keyformat);
    TString val = this->getEntry(i,validx,valformat);
    map[k] = val;
  }
  return map;
}

int TQTable::findColumn(TString colname, bool caseSensitive) {
  return this->findColumn(colname, 0, caseSensitive);
}

int TQTable::findColumn(TString colname, int row, bool caseSensitive){
  // retrieve the index of a column with the given name
  // return -1 if none found
  if(!caseSensitive) colname.ToLower();
  for(unsigned int j=0; j<this->ncols; j++){
    TString entry = this->getEntryPlain(row,j,false);
    if(!caseSensitive) entry.ToLower();
    if(TQStringUtils::matches(entry,colname)){
      return j;
    }
  }
  return -1;
}


int TQTable::findRow(TString content, int column, bool caseSensitive){
  // retrieve the index of a row where the given column has the given content
  // return -1 if none found
  if(!caseSensitive) content.ToLower();
  for(unsigned int i=0; i<this->nrows; i++){
    TString entry = this->getEntryPlain(i,column,false);
    if(!caseSensitive) entry.ToLower();
    DEBUGclass("comparing '%s' and '%s'",entry.Data(),content.Data());
    if(TQStringUtils::matches(entry,content)){
      DEBUGclass("match found!");
      return i;
    } else {
      DEBUGclass("not matching");
    }
  }
  DEBUGclass("didnt find a match for '%s' in column %d",content.Data(),column);
  return -1;
}

int TQTable::readColumn(TQTable* other, const TString& colname, const TString& matchcolname){
  // read a column from another table
  return this->readColumn(other,other->findColumn(colname),this->findColumn(matchcolname),other->findColumn(matchcolname));
}

int TQTable::readColumn(TQTable* other, const TString& colname, int thismatchcol, int othermatchcol){
  // read a column from another table
  return this->readColumn(other,other->findColumn(colname),thismatchcol,othermatchcol);
}

int TQTable::readColumn(TQTable* other, int col, int thismatchcol,int othermatchcol){
  // read a column from another table
  unsigned int newcol = this->getNcols();
  int set = 0;
  for(unsigned int row=1; row<(unsigned int)(other->getNrows()); ++row){
    const TString current(other->getEntryPlain(row,othermatchcol,false));
    int thisRow = this->findRow(current,thismatchcol);
    if(thisRow < 0){
      DEBUGclass("for '%s', didn't find a matching row in column %d",current.Data(),thismatchcol);
      continue;
    }
    TQTaggable* oldItem = other->getEntryInternal(row,col,false);
    if(oldItem){
      TQTaggable* newItem = this->getEntryInternal(thisRow,newcol,true);
      newItem->importTags(oldItem);
      DEBUGclass("copying '%s': %s",current.Data(),newItem->exportTagsAsString().Data());
      set++;
    }
  }
  return set;
}

int TQTable::markDifferences(TQTable* other, const TString& color, int colID, int rowID, const TString& format) {
  // Set the background color of this table's cells to 'color' if
  // the cell content does not match the content of the corresponding
  // cell in the other table. The equivalence of cell contents is
  // evaluated based on the content for the specified format.
  //
  // If the table dimensions do not match no changes are performed and
  // false is returned unless for the mismatched dimension a column/row
  // number is given which should be used to identify the row/column to
  // be compared to.

  if (!other || (this->getNcols() != other->getNcols() && rowID<0) || (this->getNrows() != other->getNrows() && colID<0) ) return -1;
  int nMarks = 0;
  int ii = 0;
  int jj = 0;
  for (int i=0; i<this->getNrows(); ++i) {
    ii = colID<0 ? i : other->findRow(this->getEntryPlain(i,colID),colID); //find row in other table corresponding to the current row in this table
    for (int j=0; j<this->getNcols(); ++j) {
      jj = rowID<0 ? j : other->findColumn(this->getEntryPlain(rowID,j),rowID); //find column in other table corresponding to the current column in this table
      if (!TQStringUtils::equal(this->getEntry(i,j,format), other->getEntry(ii,jj,format))) {
        this->setProperty(i,j,"cellcolor",color);
        nMarks++;
      }
    }
  }
  return nMarks;
}
 TQTable.cxx:1
 TQTable.cxx:2
 TQTable.cxx:3
 TQTable.cxx:4
 TQTable.cxx:5
 TQTable.cxx:6
 TQTable.cxx:7
 TQTable.cxx:8
 TQTable.cxx:9
 TQTable.cxx:10
 TQTable.cxx:11
 TQTable.cxx:12
 TQTable.cxx:13
 TQTable.cxx:14
 TQTable.cxx:15
 TQTable.cxx:16
 TQTable.cxx:17
 TQTable.cxx:18
 TQTable.cxx:19
 TQTable.cxx:20
 TQTable.cxx:21
 TQTable.cxx:22
 TQTable.cxx:23
 TQTable.cxx:24
 TQTable.cxx:25
 TQTable.cxx:26
 TQTable.cxx:27
 TQTable.cxx:28
 TQTable.cxx:29
 TQTable.cxx:30
 TQTable.cxx:31
 TQTable.cxx:32
 TQTable.cxx:33
 TQTable.cxx:34
 TQTable.cxx:35
 TQTable.cxx:36
 TQTable.cxx:37
 TQTable.cxx:38
 TQTable.cxx:39
 TQTable.cxx:40
 TQTable.cxx:41
 TQTable.cxx:42
 TQTable.cxx:43
 TQTable.cxx:44
 TQTable.cxx:45
 TQTable.cxx:46
 TQTable.cxx:47
 TQTable.cxx:48
 TQTable.cxx:49
 TQTable.cxx:50
 TQTable.cxx:51
 TQTable.cxx:52
 TQTable.cxx:53
 TQTable.cxx:54
 TQTable.cxx:55
 TQTable.cxx:56
 TQTable.cxx:57
 TQTable.cxx:58
 TQTable.cxx:59
 TQTable.cxx:60
 TQTable.cxx:61
 TQTable.cxx:62
 TQTable.cxx:63
 TQTable.cxx:64
 TQTable.cxx:65
 TQTable.cxx:66
 TQTable.cxx:67
 TQTable.cxx:68
 TQTable.cxx:69
 TQTable.cxx:70
 TQTable.cxx:71
 TQTable.cxx:72
 TQTable.cxx:73
 TQTable.cxx:74
 TQTable.cxx:75
 TQTable.cxx:76
 TQTable.cxx:77
 TQTable.cxx:78
 TQTable.cxx:79
 TQTable.cxx:80
 TQTable.cxx:81
 TQTable.cxx:82
 TQTable.cxx:83
 TQTable.cxx:84
 TQTable.cxx:85
 TQTable.cxx:86
 TQTable.cxx:87
 TQTable.cxx:88
 TQTable.cxx:89
 TQTable.cxx:90
 TQTable.cxx:91
 TQTable.cxx:92
 TQTable.cxx:93
 TQTable.cxx:94
 TQTable.cxx:95
 TQTable.cxx:96
 TQTable.cxx:97
 TQTable.cxx:98
 TQTable.cxx:99
 TQTable.cxx:100
 TQTable.cxx:101
 TQTable.cxx:102
 TQTable.cxx:103
 TQTable.cxx:104
 TQTable.cxx:105
 TQTable.cxx:106
 TQTable.cxx:107
 TQTable.cxx:108
 TQTable.cxx:109
 TQTable.cxx:110
 TQTable.cxx:111
 TQTable.cxx:112
 TQTable.cxx:113
 TQTable.cxx:114
 TQTable.cxx:115
 TQTable.cxx:116
 TQTable.cxx:117
 TQTable.cxx:118
 TQTable.cxx:119
 TQTable.cxx:120
 TQTable.cxx:121
 TQTable.cxx:122
 TQTable.cxx:123
 TQTable.cxx:124
 TQTable.cxx:125
 TQTable.cxx:126
 TQTable.cxx:127
 TQTable.cxx:128
 TQTable.cxx:129
 TQTable.cxx:130
 TQTable.cxx:131
 TQTable.cxx:132
 TQTable.cxx:133
 TQTable.cxx:134
 TQTable.cxx:135
 TQTable.cxx:136
 TQTable.cxx:137
 TQTable.cxx:138
 TQTable.cxx:139
 TQTable.cxx:140
 TQTable.cxx:141
 TQTable.cxx:142
 TQTable.cxx:143
 TQTable.cxx:144
 TQTable.cxx:145
 TQTable.cxx:146
 TQTable.cxx:147
 TQTable.cxx:148
 TQTable.cxx:149
 TQTable.cxx:150
 TQTable.cxx:151
 TQTable.cxx:152
 TQTable.cxx:153
 TQTable.cxx:154
 TQTable.cxx:155
 TQTable.cxx:156
 TQTable.cxx:157
 TQTable.cxx:158
 TQTable.cxx:159
 TQTable.cxx:160
 TQTable.cxx:161
 TQTable.cxx:162
 TQTable.cxx:163
 TQTable.cxx:164
 TQTable.cxx:165
 TQTable.cxx:166
 TQTable.cxx:167
 TQTable.cxx:168
 TQTable.cxx:169
 TQTable.cxx:170
 TQTable.cxx:171
 TQTable.cxx:172
 TQTable.cxx:173
 TQTable.cxx:174
 TQTable.cxx:175
 TQTable.cxx:176
 TQTable.cxx:177
 TQTable.cxx:178
 TQTable.cxx:179
 TQTable.cxx:180
 TQTable.cxx:181
 TQTable.cxx:182
 TQTable.cxx:183
 TQTable.cxx:184
 TQTable.cxx:185
 TQTable.cxx:186
 TQTable.cxx:187
 TQTable.cxx:188
 TQTable.cxx:189
 TQTable.cxx:190
 TQTable.cxx:191
 TQTable.cxx:192
 TQTable.cxx:193
 TQTable.cxx:194
 TQTable.cxx:195
 TQTable.cxx:196
 TQTable.cxx:197
 TQTable.cxx:198
 TQTable.cxx:199
 TQTable.cxx:200
 TQTable.cxx:201
 TQTable.cxx:202
 TQTable.cxx:203
 TQTable.cxx:204
 TQTable.cxx:205
 TQTable.cxx:206
 TQTable.cxx:207
 TQTable.cxx:208
 TQTable.cxx:209
 TQTable.cxx:210
 TQTable.cxx:211
 TQTable.cxx:212
 TQTable.cxx:213
 TQTable.cxx:214
 TQTable.cxx:215
 TQTable.cxx:216
 TQTable.cxx:217
 TQTable.cxx:218
 TQTable.cxx:219
 TQTable.cxx:220
 TQTable.cxx:221
 TQTable.cxx:222
 TQTable.cxx:223
 TQTable.cxx:224
 TQTable.cxx:225
 TQTable.cxx:226
 TQTable.cxx:227
 TQTable.cxx:228
 TQTable.cxx:229
 TQTable.cxx:230
 TQTable.cxx:231
 TQTable.cxx:232
 TQTable.cxx:233
 TQTable.cxx:234
 TQTable.cxx:235
 TQTable.cxx:236
 TQTable.cxx:237
 TQTable.cxx:238
 TQTable.cxx:239
 TQTable.cxx:240
 TQTable.cxx:241
 TQTable.cxx:242
 TQTable.cxx:243
 TQTable.cxx:244
 TQTable.cxx:245
 TQTable.cxx:246
 TQTable.cxx:247
 TQTable.cxx:248
 TQTable.cxx:249
 TQTable.cxx:250
 TQTable.cxx:251
 TQTable.cxx:252
 TQTable.cxx:253
 TQTable.cxx:254
 TQTable.cxx:255
 TQTable.cxx:256
 TQTable.cxx:257
 TQTable.cxx:258
 TQTable.cxx:259
 TQTable.cxx:260
 TQTable.cxx:261
 TQTable.cxx:262
 TQTable.cxx:263
 TQTable.cxx:264
 TQTable.cxx:265
 TQTable.cxx:266
 TQTable.cxx:267
 TQTable.cxx:268
 TQTable.cxx:269
 TQTable.cxx:270
 TQTable.cxx:271
 TQTable.cxx:272
 TQTable.cxx:273
 TQTable.cxx:274
 TQTable.cxx:275
 TQTable.cxx:276
 TQTable.cxx:277
 TQTable.cxx:278
 TQTable.cxx:279
 TQTable.cxx:280
 TQTable.cxx:281
 TQTable.cxx:282
 TQTable.cxx:283
 TQTable.cxx:284
 TQTable.cxx:285
 TQTable.cxx:286
 TQTable.cxx:287
 TQTable.cxx:288
 TQTable.cxx:289
 TQTable.cxx:290
 TQTable.cxx:291
 TQTable.cxx:292
 TQTable.cxx:293
 TQTable.cxx:294
 TQTable.cxx:295
 TQTable.cxx:296
 TQTable.cxx:297
 TQTable.cxx:298
 TQTable.cxx:299
 TQTable.cxx:300
 TQTable.cxx:301
 TQTable.cxx:302
 TQTable.cxx:303
 TQTable.cxx:304
 TQTable.cxx:305
 TQTable.cxx:306
 TQTable.cxx:307
 TQTable.cxx:308
 TQTable.cxx:309
 TQTable.cxx:310
 TQTable.cxx:311
 TQTable.cxx:312
 TQTable.cxx:313
 TQTable.cxx:314
 TQTable.cxx:315
 TQTable.cxx:316
 TQTable.cxx:317
 TQTable.cxx:318
 TQTable.cxx:319
 TQTable.cxx:320
 TQTable.cxx:321
 TQTable.cxx:322
 TQTable.cxx:323
 TQTable.cxx:324
 TQTable.cxx:325
 TQTable.cxx:326
 TQTable.cxx:327
 TQTable.cxx:328
 TQTable.cxx:329
 TQTable.cxx:330
 TQTable.cxx:331
 TQTable.cxx:332
 TQTable.cxx:333
 TQTable.cxx:334
 TQTable.cxx:335
 TQTable.cxx:336
 TQTable.cxx:337
 TQTable.cxx:338
 TQTable.cxx:339
 TQTable.cxx:340
 TQTable.cxx:341
 TQTable.cxx:342
 TQTable.cxx:343
 TQTable.cxx:344
 TQTable.cxx:345
 TQTable.cxx:346
 TQTable.cxx:347
 TQTable.cxx:348
 TQTable.cxx:349
 TQTable.cxx:350
 TQTable.cxx:351
 TQTable.cxx:352
 TQTable.cxx:353
 TQTable.cxx:354
 TQTable.cxx:355
 TQTable.cxx:356
 TQTable.cxx:357
 TQTable.cxx:358
 TQTable.cxx:359
 TQTable.cxx:360
 TQTable.cxx:361
 TQTable.cxx:362
 TQTable.cxx:363
 TQTable.cxx:364
 TQTable.cxx:365
 TQTable.cxx:366
 TQTable.cxx:367
 TQTable.cxx:368
 TQTable.cxx:369
 TQTable.cxx:370
 TQTable.cxx:371
 TQTable.cxx:372
 TQTable.cxx:373
 TQTable.cxx:374
 TQTable.cxx:375
 TQTable.cxx:376
 TQTable.cxx:377
 TQTable.cxx:378
 TQTable.cxx:379
 TQTable.cxx:380
 TQTable.cxx:381
 TQTable.cxx:382
 TQTable.cxx:383
 TQTable.cxx:384
 TQTable.cxx:385
 TQTable.cxx:386
 TQTable.cxx:387
 TQTable.cxx:388
 TQTable.cxx:389
 TQTable.cxx:390
 TQTable.cxx:391
 TQTable.cxx:392
 TQTable.cxx:393
 TQTable.cxx:394
 TQTable.cxx:395
 TQTable.cxx:396
 TQTable.cxx:397
 TQTable.cxx:398
 TQTable.cxx:399
 TQTable.cxx:400
 TQTable.cxx:401
 TQTable.cxx:402
 TQTable.cxx:403
 TQTable.cxx:404
 TQTable.cxx:405
 TQTable.cxx:406
 TQTable.cxx:407
 TQTable.cxx:408
 TQTable.cxx:409
 TQTable.cxx:410
 TQTable.cxx:411
 TQTable.cxx:412
 TQTable.cxx:413
 TQTable.cxx:414
 TQTable.cxx:415
 TQTable.cxx:416
 TQTable.cxx:417
 TQTable.cxx:418
 TQTable.cxx:419
 TQTable.cxx:420
 TQTable.cxx:421
 TQTable.cxx:422
 TQTable.cxx:423
 TQTable.cxx:424
 TQTable.cxx:425
 TQTable.cxx:426
 TQTable.cxx:427
 TQTable.cxx:428
 TQTable.cxx:429
 TQTable.cxx:430
 TQTable.cxx:431
 TQTable.cxx:432
 TQTable.cxx:433
 TQTable.cxx:434
 TQTable.cxx:435
 TQTable.cxx:436
 TQTable.cxx:437
 TQTable.cxx:438
 TQTable.cxx:439
 TQTable.cxx:440
 TQTable.cxx:441
 TQTable.cxx:442
 TQTable.cxx:443
 TQTable.cxx:444
 TQTable.cxx:445
 TQTable.cxx:446
 TQTable.cxx:447
 TQTable.cxx:448
 TQTable.cxx:449
 TQTable.cxx:450
 TQTable.cxx:451
 TQTable.cxx:452
 TQTable.cxx:453
 TQTable.cxx:454
 TQTable.cxx:455
 TQTable.cxx:456
 TQTable.cxx:457
 TQTable.cxx:458
 TQTable.cxx:459
 TQTable.cxx:460
 TQTable.cxx:461
 TQTable.cxx:462
 TQTable.cxx:463
 TQTable.cxx:464
 TQTable.cxx:465
 TQTable.cxx:466
 TQTable.cxx:467
 TQTable.cxx:468
 TQTable.cxx:469
 TQTable.cxx:470
 TQTable.cxx:471
 TQTable.cxx:472
 TQTable.cxx:473
 TQTable.cxx:474
 TQTable.cxx:475
 TQTable.cxx:476
 TQTable.cxx:477
 TQTable.cxx:478
 TQTable.cxx:479
 TQTable.cxx:480
 TQTable.cxx:481
 TQTable.cxx:482
 TQTable.cxx:483
 TQTable.cxx:484
 TQTable.cxx:485
 TQTable.cxx:486
 TQTable.cxx:487
 TQTable.cxx:488
 TQTable.cxx:489
 TQTable.cxx:490
 TQTable.cxx:491
 TQTable.cxx:492
 TQTable.cxx:493
 TQTable.cxx:494
 TQTable.cxx:495
 TQTable.cxx:496
 TQTable.cxx:497
 TQTable.cxx:498
 TQTable.cxx:499
 TQTable.cxx:500
 TQTable.cxx:501
 TQTable.cxx:502
 TQTable.cxx:503
 TQTable.cxx:504
 TQTable.cxx:505
 TQTable.cxx:506
 TQTable.cxx:507
 TQTable.cxx:508
 TQTable.cxx:509
 TQTable.cxx:510
 TQTable.cxx:511
 TQTable.cxx:512
 TQTable.cxx:513
 TQTable.cxx:514
 TQTable.cxx:515
 TQTable.cxx:516
 TQTable.cxx:517
 TQTable.cxx:518
 TQTable.cxx:519
 TQTable.cxx:520
 TQTable.cxx:521
 TQTable.cxx:522
 TQTable.cxx:523
 TQTable.cxx:524
 TQTable.cxx:525
 TQTable.cxx:526
 TQTable.cxx:527
 TQTable.cxx:528
 TQTable.cxx:529
 TQTable.cxx:530
 TQTable.cxx:531
 TQTable.cxx:532
 TQTable.cxx:533
 TQTable.cxx:534
 TQTable.cxx:535
 TQTable.cxx:536
 TQTable.cxx:537
 TQTable.cxx:538
 TQTable.cxx:539
 TQTable.cxx:540
 TQTable.cxx:541
 TQTable.cxx:542
 TQTable.cxx:543
 TQTable.cxx:544
 TQTable.cxx:545
 TQTable.cxx:546
 TQTable.cxx:547
 TQTable.cxx:548
 TQTable.cxx:549
 TQTable.cxx:550
 TQTable.cxx:551
 TQTable.cxx:552
 TQTable.cxx:553
 TQTable.cxx:554
 TQTable.cxx:555
 TQTable.cxx:556
 TQTable.cxx:557
 TQTable.cxx:558
 TQTable.cxx:559
 TQTable.cxx:560
 TQTable.cxx:561
 TQTable.cxx:562
 TQTable.cxx:563
 TQTable.cxx:564
 TQTable.cxx:565
 TQTable.cxx:566
 TQTable.cxx:567
 TQTable.cxx:568
 TQTable.cxx:569
 TQTable.cxx:570
 TQTable.cxx:571
 TQTable.cxx:572
 TQTable.cxx:573
 TQTable.cxx:574
 TQTable.cxx:575
 TQTable.cxx:576
 TQTable.cxx:577
 TQTable.cxx:578
 TQTable.cxx:579
 TQTable.cxx:580
 TQTable.cxx:581
 TQTable.cxx:582
 TQTable.cxx:583
 TQTable.cxx:584
 TQTable.cxx:585
 TQTable.cxx:586
 TQTable.cxx:587
 TQTable.cxx:588
 TQTable.cxx:589
 TQTable.cxx:590
 TQTable.cxx:591
 TQTable.cxx:592
 TQTable.cxx:593
 TQTable.cxx:594
 TQTable.cxx:595
 TQTable.cxx:596
 TQTable.cxx:597
 TQTable.cxx:598
 TQTable.cxx:599
 TQTable.cxx:600
 TQTable.cxx:601
 TQTable.cxx:602
 TQTable.cxx:603
 TQTable.cxx:604
 TQTable.cxx:605
 TQTable.cxx:606
 TQTable.cxx:607
 TQTable.cxx:608
 TQTable.cxx:609
 TQTable.cxx:610
 TQTable.cxx:611
 TQTable.cxx:612
 TQTable.cxx:613
 TQTable.cxx:614
 TQTable.cxx:615
 TQTable.cxx:616
 TQTable.cxx:617
 TQTable.cxx:618
 TQTable.cxx:619
 TQTable.cxx:620
 TQTable.cxx:621
 TQTable.cxx:622
 TQTable.cxx:623
 TQTable.cxx:624
 TQTable.cxx:625
 TQTable.cxx:626
 TQTable.cxx:627
 TQTable.cxx:628
 TQTable.cxx:629
 TQTable.cxx:630
 TQTable.cxx:631
 TQTable.cxx:632
 TQTable.cxx:633
 TQTable.cxx:634
 TQTable.cxx:635
 TQTable.cxx:636
 TQTable.cxx:637
 TQTable.cxx:638
 TQTable.cxx:639
 TQTable.cxx:640
 TQTable.cxx:641
 TQTable.cxx:642
 TQTable.cxx:643
 TQTable.cxx:644
 TQTable.cxx:645
 TQTable.cxx:646
 TQTable.cxx:647
 TQTable.cxx:648
 TQTable.cxx:649
 TQTable.cxx:650
 TQTable.cxx:651
 TQTable.cxx:652
 TQTable.cxx:653
 TQTable.cxx:654
 TQTable.cxx:655
 TQTable.cxx:656
 TQTable.cxx:657
 TQTable.cxx:658
 TQTable.cxx:659
 TQTable.cxx:660
 TQTable.cxx:661
 TQTable.cxx:662
 TQTable.cxx:663
 TQTable.cxx:664
 TQTable.cxx:665
 TQTable.cxx:666
 TQTable.cxx:667
 TQTable.cxx:668
 TQTable.cxx:669
 TQTable.cxx:670
 TQTable.cxx:671
 TQTable.cxx:672
 TQTable.cxx:673
 TQTable.cxx:674
 TQTable.cxx:675
 TQTable.cxx:676
 TQTable.cxx:677
 TQTable.cxx:678
 TQTable.cxx:679
 TQTable.cxx:680
 TQTable.cxx:681
 TQTable.cxx:682
 TQTable.cxx:683
 TQTable.cxx:684
 TQTable.cxx:685
 TQTable.cxx:686
 TQTable.cxx:687
 TQTable.cxx:688
 TQTable.cxx:689
 TQTable.cxx:690
 TQTable.cxx:691
 TQTable.cxx:692
 TQTable.cxx:693
 TQTable.cxx:694
 TQTable.cxx:695
 TQTable.cxx:696
 TQTable.cxx:697
 TQTable.cxx:698
 TQTable.cxx:699
 TQTable.cxx:700
 TQTable.cxx:701
 TQTable.cxx:702
 TQTable.cxx:703
 TQTable.cxx:704
 TQTable.cxx:705
 TQTable.cxx:706
 TQTable.cxx:707
 TQTable.cxx:708
 TQTable.cxx:709
 TQTable.cxx:710
 TQTable.cxx:711
 TQTable.cxx:712
 TQTable.cxx:713
 TQTable.cxx:714
 TQTable.cxx:715
 TQTable.cxx:716
 TQTable.cxx:717
 TQTable.cxx:718
 TQTable.cxx:719
 TQTable.cxx:720
 TQTable.cxx:721
 TQTable.cxx:722
 TQTable.cxx:723
 TQTable.cxx:724
 TQTable.cxx:725
 TQTable.cxx:726
 TQTable.cxx:727
 TQTable.cxx:728
 TQTable.cxx:729
 TQTable.cxx:730
 TQTable.cxx:731
 TQTable.cxx:732
 TQTable.cxx:733
 TQTable.cxx:734
 TQTable.cxx:735
 TQTable.cxx:736
 TQTable.cxx:737
 TQTable.cxx:738
 TQTable.cxx:739
 TQTable.cxx:740
 TQTable.cxx:741
 TQTable.cxx:742
 TQTable.cxx:743
 TQTable.cxx:744
 TQTable.cxx:745
 TQTable.cxx:746
 TQTable.cxx:747
 TQTable.cxx:748
 TQTable.cxx:749
 TQTable.cxx:750
 TQTable.cxx:751
 TQTable.cxx:752
 TQTable.cxx:753
 TQTable.cxx:754
 TQTable.cxx:755
 TQTable.cxx:756
 TQTable.cxx:757
 TQTable.cxx:758
 TQTable.cxx:759
 TQTable.cxx:760
 TQTable.cxx:761
 TQTable.cxx:762
 TQTable.cxx:763
 TQTable.cxx:764
 TQTable.cxx:765
 TQTable.cxx:766
 TQTable.cxx:767
 TQTable.cxx:768
 TQTable.cxx:769
 TQTable.cxx:770
 TQTable.cxx:771
 TQTable.cxx:772
 TQTable.cxx:773
 TQTable.cxx:774
 TQTable.cxx:775
 TQTable.cxx:776
 TQTable.cxx:777
 TQTable.cxx:778
 TQTable.cxx:779
 TQTable.cxx:780
 TQTable.cxx:781
 TQTable.cxx:782
 TQTable.cxx:783
 TQTable.cxx:784
 TQTable.cxx:785
 TQTable.cxx:786
 TQTable.cxx:787
 TQTable.cxx:788
 TQTable.cxx:789
 TQTable.cxx:790
 TQTable.cxx:791
 TQTable.cxx:792
 TQTable.cxx:793
 TQTable.cxx:794
 TQTable.cxx:795
 TQTable.cxx:796
 TQTable.cxx:797
 TQTable.cxx:798
 TQTable.cxx:799
 TQTable.cxx:800
 TQTable.cxx:801
 TQTable.cxx:802
 TQTable.cxx:803
 TQTable.cxx:804
 TQTable.cxx:805
 TQTable.cxx:806
 TQTable.cxx:807
 TQTable.cxx:808
 TQTable.cxx:809
 TQTable.cxx:810
 TQTable.cxx:811
 TQTable.cxx:812
 TQTable.cxx:813
 TQTable.cxx:814
 TQTable.cxx:815
 TQTable.cxx:816
 TQTable.cxx:817
 TQTable.cxx:818
 TQTable.cxx:819
 TQTable.cxx:820
 TQTable.cxx:821
 TQTable.cxx:822
 TQTable.cxx:823
 TQTable.cxx:824
 TQTable.cxx:825
 TQTable.cxx:826
 TQTable.cxx:827
 TQTable.cxx:828
 TQTable.cxx:829
 TQTable.cxx:830
 TQTable.cxx:831
 TQTable.cxx:832
 TQTable.cxx:833
 TQTable.cxx:834
 TQTable.cxx:835
 TQTable.cxx:836
 TQTable.cxx:837
 TQTable.cxx:838
 TQTable.cxx:839
 TQTable.cxx:840
 TQTable.cxx:841
 TQTable.cxx:842
 TQTable.cxx:843
 TQTable.cxx:844
 TQTable.cxx:845
 TQTable.cxx:846
 TQTable.cxx:847
 TQTable.cxx:848
 TQTable.cxx:849
 TQTable.cxx:850
 TQTable.cxx:851
 TQTable.cxx:852
 TQTable.cxx:853
 TQTable.cxx:854
 TQTable.cxx:855
 TQTable.cxx:856
 TQTable.cxx:857
 TQTable.cxx:858
 TQTable.cxx:859
 TQTable.cxx:860
 TQTable.cxx:861
 TQTable.cxx:862
 TQTable.cxx:863
 TQTable.cxx:864
 TQTable.cxx:865
 TQTable.cxx:866
 TQTable.cxx:867
 TQTable.cxx:868
 TQTable.cxx:869
 TQTable.cxx:870
 TQTable.cxx:871
 TQTable.cxx:872
 TQTable.cxx:873
 TQTable.cxx:874
 TQTable.cxx:875
 TQTable.cxx:876
 TQTable.cxx:877
 TQTable.cxx:878
 TQTable.cxx:879
 TQTable.cxx:880
 TQTable.cxx:881
 TQTable.cxx:882
 TQTable.cxx:883
 TQTable.cxx:884
 TQTable.cxx:885
 TQTable.cxx:886
 TQTable.cxx:887
 TQTable.cxx:888
 TQTable.cxx:889
 TQTable.cxx:890
 TQTable.cxx:891
 TQTable.cxx:892
 TQTable.cxx:893
 TQTable.cxx:894
 TQTable.cxx:895
 TQTable.cxx:896
 TQTable.cxx:897
 TQTable.cxx:898
 TQTable.cxx:899
 TQTable.cxx:900
 TQTable.cxx:901
 TQTable.cxx:902
 TQTable.cxx:903
 TQTable.cxx:904
 TQTable.cxx:905
 TQTable.cxx:906
 TQTable.cxx:907
 TQTable.cxx:908
 TQTable.cxx:909
 TQTable.cxx:910
 TQTable.cxx:911
 TQTable.cxx:912
 TQTable.cxx:913
 TQTable.cxx:914
 TQTable.cxx:915
 TQTable.cxx:916
 TQTable.cxx:917
 TQTable.cxx:918
 TQTable.cxx:919
 TQTable.cxx:920
 TQTable.cxx:921
 TQTable.cxx:922
 TQTable.cxx:923
 TQTable.cxx:924
 TQTable.cxx:925
 TQTable.cxx:926
 TQTable.cxx:927
 TQTable.cxx:928
 TQTable.cxx:929
 TQTable.cxx:930
 TQTable.cxx:931
 TQTable.cxx:932
 TQTable.cxx:933
 TQTable.cxx:934
 TQTable.cxx:935
 TQTable.cxx:936
 TQTable.cxx:937
 TQTable.cxx:938
 TQTable.cxx:939
 TQTable.cxx:940
 TQTable.cxx:941
 TQTable.cxx:942
 TQTable.cxx:943
 TQTable.cxx:944
 TQTable.cxx:945
 TQTable.cxx:946
 TQTable.cxx:947
 TQTable.cxx:948
 TQTable.cxx:949
 TQTable.cxx:950
 TQTable.cxx:951
 TQTable.cxx:952
 TQTable.cxx:953
 TQTable.cxx:954
 TQTable.cxx:955
 TQTable.cxx:956
 TQTable.cxx:957
 TQTable.cxx:958
 TQTable.cxx:959
 TQTable.cxx:960
 TQTable.cxx:961
 TQTable.cxx:962
 TQTable.cxx:963
 TQTable.cxx:964
 TQTable.cxx:965
 TQTable.cxx:966
 TQTable.cxx:967
 TQTable.cxx:968
 TQTable.cxx:969
 TQTable.cxx:970
 TQTable.cxx:971
 TQTable.cxx:972
 TQTable.cxx:973
 TQTable.cxx:974
 TQTable.cxx:975
 TQTable.cxx:976
 TQTable.cxx:977
 TQTable.cxx:978
 TQTable.cxx:979
 TQTable.cxx:980
 TQTable.cxx:981
 TQTable.cxx:982
 TQTable.cxx:983
 TQTable.cxx:984
 TQTable.cxx:985
 TQTable.cxx:986
 TQTable.cxx:987
 TQTable.cxx:988
 TQTable.cxx:989
 TQTable.cxx:990
 TQTable.cxx:991
 TQTable.cxx:992
 TQTable.cxx:993
 TQTable.cxx:994
 TQTable.cxx:995
 TQTable.cxx:996
 TQTable.cxx:997
 TQTable.cxx:998
 TQTable.cxx:999
 TQTable.cxx:1000
 TQTable.cxx:1001
 TQTable.cxx:1002
 TQTable.cxx:1003
 TQTable.cxx:1004
 TQTable.cxx:1005
 TQTable.cxx:1006
 TQTable.cxx:1007
 TQTable.cxx:1008
 TQTable.cxx:1009
 TQTable.cxx:1010
 TQTable.cxx:1011
 TQTable.cxx:1012
 TQTable.cxx:1013
 TQTable.cxx:1014
 TQTable.cxx:1015
 TQTable.cxx:1016
 TQTable.cxx:1017
 TQTable.cxx:1018
 TQTable.cxx:1019
 TQTable.cxx:1020
 TQTable.cxx:1021
 TQTable.cxx:1022
 TQTable.cxx:1023
 TQTable.cxx:1024
 TQTable.cxx:1025
 TQTable.cxx:1026
 TQTable.cxx:1027
 TQTable.cxx:1028
 TQTable.cxx:1029
 TQTable.cxx:1030
 TQTable.cxx:1031
 TQTable.cxx:1032
 TQTable.cxx:1033
 TQTable.cxx:1034
 TQTable.cxx:1035
 TQTable.cxx:1036
 TQTable.cxx:1037
 TQTable.cxx:1038
 TQTable.cxx:1039
 TQTable.cxx:1040
 TQTable.cxx:1041
 TQTable.cxx:1042
 TQTable.cxx:1043
 TQTable.cxx:1044
 TQTable.cxx:1045
 TQTable.cxx:1046
 TQTable.cxx:1047
 TQTable.cxx:1048
 TQTable.cxx:1049
 TQTable.cxx:1050
 TQTable.cxx:1051
 TQTable.cxx:1052
 TQTable.cxx:1053
 TQTable.cxx:1054
 TQTable.cxx:1055
 TQTable.cxx:1056
 TQTable.cxx:1057
 TQTable.cxx:1058
 TQTable.cxx:1059
 TQTable.cxx:1060
 TQTable.cxx:1061
 TQTable.cxx:1062
 TQTable.cxx:1063
 TQTable.cxx:1064
 TQTable.cxx:1065
 TQTable.cxx:1066
 TQTable.cxx:1067
 TQTable.cxx:1068
 TQTable.cxx:1069
 TQTable.cxx:1070
 TQTable.cxx:1071
 TQTable.cxx:1072
 TQTable.cxx:1073
 TQTable.cxx:1074
 TQTable.cxx:1075
 TQTable.cxx:1076
 TQTable.cxx:1077
 TQTable.cxx:1078
 TQTable.cxx:1079
 TQTable.cxx:1080
 TQTable.cxx:1081
 TQTable.cxx:1082
 TQTable.cxx:1083
 TQTable.cxx:1084
 TQTable.cxx:1085
 TQTable.cxx:1086
 TQTable.cxx:1087
 TQTable.cxx:1088
 TQTable.cxx:1089
 TQTable.cxx:1090
 TQTable.cxx:1091
 TQTable.cxx:1092
 TQTable.cxx:1093
 TQTable.cxx:1094
 TQTable.cxx:1095
 TQTable.cxx:1096
 TQTable.cxx:1097
 TQTable.cxx:1098
 TQTable.cxx:1099
 TQTable.cxx:1100
 TQTable.cxx:1101
 TQTable.cxx:1102
 TQTable.cxx:1103
 TQTable.cxx:1104
 TQTable.cxx:1105
 TQTable.cxx:1106
 TQTable.cxx:1107
 TQTable.cxx:1108
 TQTable.cxx:1109
 TQTable.cxx:1110
 TQTable.cxx:1111
 TQTable.cxx:1112
 TQTable.cxx:1113
 TQTable.cxx:1114
 TQTable.cxx:1115
 TQTable.cxx:1116
 TQTable.cxx:1117
 TQTable.cxx:1118
 TQTable.cxx:1119
 TQTable.cxx:1120
 TQTable.cxx:1121
 TQTable.cxx:1122
 TQTable.cxx:1123
 TQTable.cxx:1124
 TQTable.cxx:1125
 TQTable.cxx:1126
 TQTable.cxx:1127
 TQTable.cxx:1128
 TQTable.cxx:1129
 TQTable.cxx:1130
 TQTable.cxx:1131
 TQTable.cxx:1132
 TQTable.cxx:1133
 TQTable.cxx:1134
 TQTable.cxx:1135
 TQTable.cxx:1136
 TQTable.cxx:1137
 TQTable.cxx:1138
 TQTable.cxx:1139
 TQTable.cxx:1140
 TQTable.cxx:1141
 TQTable.cxx:1142
 TQTable.cxx:1143
 TQTable.cxx:1144
 TQTable.cxx:1145
 TQTable.cxx:1146
 TQTable.cxx:1147
 TQTable.cxx:1148
 TQTable.cxx:1149
 TQTable.cxx:1150
 TQTable.cxx:1151
 TQTable.cxx:1152
 TQTable.cxx:1153
 TQTable.cxx:1154
 TQTable.cxx:1155
 TQTable.cxx:1156
 TQTable.cxx:1157
 TQTable.cxx:1158
 TQTable.cxx:1159
 TQTable.cxx:1160
 TQTable.cxx:1161
 TQTable.cxx:1162
 TQTable.cxx:1163
 TQTable.cxx:1164
 TQTable.cxx:1165
 TQTable.cxx:1166
 TQTable.cxx:1167
 TQTable.cxx:1168
 TQTable.cxx:1169
 TQTable.cxx:1170
 TQTable.cxx:1171
 TQTable.cxx:1172
 TQTable.cxx:1173
 TQTable.cxx:1174
 TQTable.cxx:1175
 TQTable.cxx:1176
 TQTable.cxx:1177
 TQTable.cxx:1178
 TQTable.cxx:1179
 TQTable.cxx:1180
 TQTable.cxx:1181
 TQTable.cxx:1182
 TQTable.cxx:1183
 TQTable.cxx:1184
 TQTable.cxx:1185
 TQTable.cxx:1186
 TQTable.cxx:1187
 TQTable.cxx:1188
 TQTable.cxx:1189
 TQTable.cxx:1190
 TQTable.cxx:1191
 TQTable.cxx:1192
 TQTable.cxx:1193
 TQTable.cxx:1194
 TQTable.cxx:1195
 TQTable.cxx:1196
 TQTable.cxx:1197
 TQTable.cxx:1198
 TQTable.cxx:1199
 TQTable.cxx:1200
 TQTable.cxx:1201
 TQTable.cxx:1202
 TQTable.cxx:1203
 TQTable.cxx:1204
 TQTable.cxx:1205
 TQTable.cxx:1206
 TQTable.cxx:1207
 TQTable.cxx:1208
 TQTable.cxx:1209
 TQTable.cxx:1210
 TQTable.cxx:1211
 TQTable.cxx:1212
 TQTable.cxx:1213
 TQTable.cxx:1214
 TQTable.cxx:1215
 TQTable.cxx:1216
 TQTable.cxx:1217
 TQTable.cxx:1218
 TQTable.cxx:1219
 TQTable.cxx:1220
 TQTable.cxx:1221
 TQTable.cxx:1222
 TQTable.cxx:1223
 TQTable.cxx:1224
 TQTable.cxx:1225
 TQTable.cxx:1226
 TQTable.cxx:1227
 TQTable.cxx:1228
 TQTable.cxx:1229
 TQTable.cxx:1230
 TQTable.cxx:1231
 TQTable.cxx:1232
 TQTable.cxx:1233
 TQTable.cxx:1234
 TQTable.cxx:1235
 TQTable.cxx:1236
 TQTable.cxx:1237
 TQTable.cxx:1238
 TQTable.cxx:1239
 TQTable.cxx:1240
 TQTable.cxx:1241
 TQTable.cxx:1242
 TQTable.cxx:1243
 TQTable.cxx:1244
 TQTable.cxx:1245
 TQTable.cxx:1246
 TQTable.cxx:1247
 TQTable.cxx:1248
 TQTable.cxx:1249
 TQTable.cxx:1250
 TQTable.cxx:1251
 TQTable.cxx:1252
 TQTable.cxx:1253
 TQTable.cxx:1254
 TQTable.cxx:1255
 TQTable.cxx:1256
 TQTable.cxx:1257
 TQTable.cxx:1258
 TQTable.cxx:1259
 TQTable.cxx:1260
 TQTable.cxx:1261
 TQTable.cxx:1262
 TQTable.cxx:1263
 TQTable.cxx:1264
 TQTable.cxx:1265
 TQTable.cxx:1266
 TQTable.cxx:1267
 TQTable.cxx:1268
 TQTable.cxx:1269
 TQTable.cxx:1270
 TQTable.cxx:1271
 TQTable.cxx:1272
 TQTable.cxx:1273
 TQTable.cxx:1274
 TQTable.cxx:1275
 TQTable.cxx:1276
 TQTable.cxx:1277
 TQTable.cxx:1278
 TQTable.cxx:1279
 TQTable.cxx:1280
 TQTable.cxx:1281
 TQTable.cxx:1282
 TQTable.cxx:1283
 TQTable.cxx:1284
 TQTable.cxx:1285
 TQTable.cxx:1286
 TQTable.cxx:1287
 TQTable.cxx:1288
 TQTable.cxx:1289
 TQTable.cxx:1290
 TQTable.cxx:1291
 TQTable.cxx:1292
 TQTable.cxx:1293
 TQTable.cxx:1294
 TQTable.cxx:1295
 TQTable.cxx:1296
 TQTable.cxx:1297
 TQTable.cxx:1298
 TQTable.cxx:1299
 TQTable.cxx:1300
 TQTable.cxx:1301
 TQTable.cxx:1302
 TQTable.cxx:1303
 TQTable.cxx:1304
 TQTable.cxx:1305
 TQTable.cxx:1306
 TQTable.cxx:1307
 TQTable.cxx:1308
 TQTable.cxx:1309
 TQTable.cxx:1310
 TQTable.cxx:1311
 TQTable.cxx:1312
 TQTable.cxx:1313
 TQTable.cxx:1314
 TQTable.cxx:1315
 TQTable.cxx:1316
 TQTable.cxx:1317
 TQTable.cxx:1318
 TQTable.cxx:1319
 TQTable.cxx:1320
 TQTable.cxx:1321
 TQTable.cxx:1322
 TQTable.cxx:1323
 TQTable.cxx:1324
 TQTable.cxx:1325
 TQTable.cxx:1326
 TQTable.cxx:1327
 TQTable.cxx:1328
 TQTable.cxx:1329
 TQTable.cxx:1330
 TQTable.cxx:1331
 TQTable.cxx:1332
 TQTable.cxx:1333
 TQTable.cxx:1334
 TQTable.cxx:1335
 TQTable.cxx:1336
 TQTable.cxx:1337
 TQTable.cxx:1338
 TQTable.cxx:1339
 TQTable.cxx:1340
 TQTable.cxx:1341
 TQTable.cxx:1342
 TQTable.cxx:1343
 TQTable.cxx:1344
 TQTable.cxx:1345
 TQTable.cxx:1346
 TQTable.cxx:1347
 TQTable.cxx:1348
 TQTable.cxx:1349
 TQTable.cxx:1350
 TQTable.cxx:1351
 TQTable.cxx:1352
 TQTable.cxx:1353
 TQTable.cxx:1354
 TQTable.cxx:1355
 TQTable.cxx:1356
 TQTable.cxx:1357
 TQTable.cxx:1358
 TQTable.cxx:1359
 TQTable.cxx:1360
 TQTable.cxx:1361
 TQTable.cxx:1362
 TQTable.cxx:1363
 TQTable.cxx:1364
 TQTable.cxx:1365
 TQTable.cxx:1366
 TQTable.cxx:1367
 TQTable.cxx:1368
 TQTable.cxx:1369
 TQTable.cxx:1370
 TQTable.cxx:1371
 TQTable.cxx:1372
 TQTable.cxx:1373
 TQTable.cxx:1374
 TQTable.cxx:1375
 TQTable.cxx:1376
 TQTable.cxx:1377
 TQTable.cxx:1378
 TQTable.cxx:1379
 TQTable.cxx:1380
 TQTable.cxx:1381
 TQTable.cxx:1382
 TQTable.cxx:1383
 TQTable.cxx:1384
 TQTable.cxx:1385
 TQTable.cxx:1386
 TQTable.cxx:1387
 TQTable.cxx:1388
 TQTable.cxx:1389
 TQTable.cxx:1390
 TQTable.cxx:1391
 TQTable.cxx:1392
 TQTable.cxx:1393
 TQTable.cxx:1394
 TQTable.cxx:1395
 TQTable.cxx:1396
 TQTable.cxx:1397
 TQTable.cxx:1398
 TQTable.cxx:1399
 TQTable.cxx:1400
 TQTable.cxx:1401
 TQTable.cxx:1402
 TQTable.cxx:1403
 TQTable.cxx:1404
 TQTable.cxx:1405
 TQTable.cxx:1406
 TQTable.cxx:1407
 TQTable.cxx:1408
 TQTable.cxx:1409
 TQTable.cxx:1410
 TQTable.cxx:1411
 TQTable.cxx:1412
 TQTable.cxx:1413
 TQTable.cxx:1414
 TQTable.cxx:1415
 TQTable.cxx:1416
 TQTable.cxx:1417
 TQTable.cxx:1418
 TQTable.cxx:1419
 TQTable.cxx:1420
 TQTable.cxx:1421
 TQTable.cxx:1422
 TQTable.cxx:1423
 TQTable.cxx:1424
 TQTable.cxx:1425
 TQTable.cxx:1426
 TQTable.cxx:1427
 TQTable.cxx:1428
 TQTable.cxx:1429
 TQTable.cxx:1430
 TQTable.cxx:1431
 TQTable.cxx:1432
 TQTable.cxx:1433
 TQTable.cxx:1434
 TQTable.cxx:1435
 TQTable.cxx:1436
 TQTable.cxx:1437
 TQTable.cxx:1438
 TQTable.cxx:1439
 TQTable.cxx:1440
 TQTable.cxx:1441
 TQTable.cxx:1442
 TQTable.cxx:1443
 TQTable.cxx:1444
 TQTable.cxx:1445
 TQTable.cxx:1446
 TQTable.cxx:1447
 TQTable.cxx:1448
 TQTable.cxx:1449
 TQTable.cxx:1450
 TQTable.cxx:1451
 TQTable.cxx:1452
 TQTable.cxx:1453
 TQTable.cxx:1454
 TQTable.cxx:1455
 TQTable.cxx:1456
 TQTable.cxx:1457
 TQTable.cxx:1458
 TQTable.cxx:1459
 TQTable.cxx:1460
 TQTable.cxx:1461
 TQTable.cxx:1462
 TQTable.cxx:1463
 TQTable.cxx:1464
 TQTable.cxx:1465
 TQTable.cxx:1466
 TQTable.cxx:1467
 TQTable.cxx:1468
 TQTable.cxx:1469
 TQTable.cxx:1470
 TQTable.cxx:1471
 TQTable.cxx:1472
 TQTable.cxx:1473
 TQTable.cxx:1474
 TQTable.cxx:1475
 TQTable.cxx:1476
 TQTable.cxx:1477
 TQTable.cxx:1478
 TQTable.cxx:1479
 TQTable.cxx:1480
 TQTable.cxx:1481
 TQTable.cxx:1482
 TQTable.cxx:1483
 TQTable.cxx:1484
 TQTable.cxx:1485
 TQTable.cxx:1486
 TQTable.cxx:1487
 TQTable.cxx:1488
 TQTable.cxx:1489
 TQTable.cxx:1490
 TQTable.cxx:1491
 TQTable.cxx:1492
 TQTable.cxx:1493
 TQTable.cxx:1494
 TQTable.cxx:1495
 TQTable.cxx:1496
 TQTable.cxx:1497
 TQTable.cxx:1498
 TQTable.cxx:1499
 TQTable.cxx:1500
 TQTable.cxx:1501
 TQTable.cxx:1502
 TQTable.cxx:1503
 TQTable.cxx:1504
 TQTable.cxx:1505
 TQTable.cxx:1506
 TQTable.cxx:1507
 TQTable.cxx:1508
 TQTable.cxx:1509
 TQTable.cxx:1510
 TQTable.cxx:1511
 TQTable.cxx:1512
 TQTable.cxx:1513
 TQTable.cxx:1514
 TQTable.cxx:1515
 TQTable.cxx:1516
 TQTable.cxx:1517
 TQTable.cxx:1518
 TQTable.cxx:1519
 TQTable.cxx:1520
 TQTable.cxx:1521
 TQTable.cxx:1522
 TQTable.cxx:1523
 TQTable.cxx:1524
 TQTable.cxx:1525
 TQTable.cxx:1526
 TQTable.cxx:1527
 TQTable.cxx:1528
 TQTable.cxx:1529
 TQTable.cxx:1530
 TQTable.cxx:1531
 TQTable.cxx:1532
 TQTable.cxx:1533
 TQTable.cxx:1534
 TQTable.cxx:1535
 TQTable.cxx:1536
 TQTable.cxx:1537
 TQTable.cxx:1538
 TQTable.cxx:1539
 TQTable.cxx:1540
 TQTable.cxx:1541
 TQTable.cxx:1542
 TQTable.cxx:1543
 TQTable.cxx:1544
 TQTable.cxx:1545
 TQTable.cxx:1546
 TQTable.cxx:1547
 TQTable.cxx:1548
 TQTable.cxx:1549
 TQTable.cxx:1550
 TQTable.cxx:1551
 TQTable.cxx:1552
 TQTable.cxx:1553
 TQTable.cxx:1554
 TQTable.cxx:1555
 TQTable.cxx:1556
 TQTable.cxx:1557
 TQTable.cxx:1558
 TQTable.cxx:1559
 TQTable.cxx:1560
 TQTable.cxx:1561
 TQTable.cxx:1562
 TQTable.cxx:1563
 TQTable.cxx:1564
 TQTable.cxx:1565
 TQTable.cxx:1566
 TQTable.cxx:1567
 TQTable.cxx:1568
 TQTable.cxx:1569
 TQTable.cxx:1570
 TQTable.cxx:1571
 TQTable.cxx:1572
 TQTable.cxx:1573
 TQTable.cxx:1574
 TQTable.cxx:1575
 TQTable.cxx:1576
 TQTable.cxx:1577
 TQTable.cxx:1578
 TQTable.cxx:1579
 TQTable.cxx:1580
 TQTable.cxx:1581
 TQTable.cxx:1582
 TQTable.cxx:1583
 TQTable.cxx:1584
 TQTable.cxx:1585
 TQTable.cxx:1586
 TQTable.cxx:1587
 TQTable.cxx:1588
 TQTable.cxx:1589
 TQTable.cxx:1590
 TQTable.cxx:1591
 TQTable.cxx:1592
 TQTable.cxx:1593
 TQTable.cxx:1594
 TQTable.cxx:1595
 TQTable.cxx:1596
 TQTable.cxx:1597
 TQTable.cxx:1598
 TQTable.cxx:1599
 TQTable.cxx:1600
 TQTable.cxx:1601
 TQTable.cxx:1602
 TQTable.cxx:1603
 TQTable.cxx:1604
 TQTable.cxx:1605
 TQTable.cxx:1606
 TQTable.cxx:1607
 TQTable.cxx:1608
 TQTable.cxx:1609
 TQTable.cxx:1610
 TQTable.cxx:1611
 TQTable.cxx:1612
 TQTable.cxx:1613
 TQTable.cxx:1614
 TQTable.cxx:1615
 TQTable.cxx:1616
 TQTable.cxx:1617
 TQTable.cxx:1618
 TQTable.cxx:1619
 TQTable.cxx:1620
 TQTable.cxx:1621
 TQTable.cxx:1622
 TQTable.cxx:1623
 TQTable.cxx:1624
 TQTable.cxx:1625
 TQTable.cxx:1626
 TQTable.cxx:1627
 TQTable.cxx:1628
 TQTable.cxx:1629
 TQTable.cxx:1630
 TQTable.cxx:1631
 TQTable.cxx:1632
 TQTable.cxx:1633
 TQTable.cxx:1634
 TQTable.cxx:1635
 TQTable.cxx:1636
 TQTable.cxx:1637
 TQTable.cxx:1638
 TQTable.cxx:1639
 TQTable.cxx:1640
 TQTable.cxx:1641
 TQTable.cxx:1642
 TQTable.cxx:1643
 TQTable.cxx:1644
 TQTable.cxx:1645
 TQTable.cxx:1646
 TQTable.cxx:1647
 TQTable.cxx:1648
 TQTable.cxx:1649
 TQTable.cxx:1650
 TQTable.cxx:1651
 TQTable.cxx:1652
 TQTable.cxx:1653
 TQTable.cxx:1654
 TQTable.cxx:1655
 TQTable.cxx:1656
 TQTable.cxx:1657
 TQTable.cxx:1658
 TQTable.cxx:1659
 TQTable.cxx:1660
 TQTable.cxx:1661
 TQTable.cxx:1662
 TQTable.cxx:1663
 TQTable.cxx:1664
 TQTable.cxx:1665
 TQTable.cxx:1666
 TQTable.cxx:1667
 TQTable.cxx:1668
 TQTable.cxx:1669
 TQTable.cxx:1670
 TQTable.cxx:1671
 TQTable.cxx:1672
 TQTable.cxx:1673
 TQTable.cxx:1674
 TQTable.cxx:1675
 TQTable.cxx:1676
 TQTable.cxx:1677
 TQTable.cxx:1678
 TQTable.cxx:1679
 TQTable.cxx:1680
 TQTable.cxx:1681
 TQTable.cxx:1682
 TQTable.cxx:1683
 TQTable.cxx:1684
 TQTable.cxx:1685
 TQTable.cxx:1686
 TQTable.cxx:1687
 TQTable.cxx:1688
 TQTable.cxx:1689
 TQTable.cxx:1690
 TQTable.cxx:1691
 TQTable.cxx:1692
 TQTable.cxx:1693
 TQTable.cxx:1694
 TQTable.cxx:1695
 TQTable.cxx:1696
 TQTable.cxx:1697
 TQTable.cxx:1698
 TQTable.cxx:1699
 TQTable.cxx:1700
 TQTable.cxx:1701
 TQTable.cxx:1702
 TQTable.cxx:1703
 TQTable.cxx:1704
 TQTable.cxx:1705
 TQTable.cxx:1706
 TQTable.cxx:1707
 TQTable.cxx:1708
 TQTable.cxx:1709
 TQTable.cxx:1710
 TQTable.cxx:1711
 TQTable.cxx:1712
 TQTable.cxx:1713
 TQTable.cxx:1714
 TQTable.cxx:1715
 TQTable.cxx:1716
 TQTable.cxx:1717
 TQTable.cxx:1718
 TQTable.cxx:1719
 TQTable.cxx:1720
 TQTable.cxx:1721
 TQTable.cxx:1722
 TQTable.cxx:1723
 TQTable.cxx:1724
 TQTable.cxx:1725
 TQTable.cxx:1726
 TQTable.cxx:1727
 TQTable.cxx:1728
 TQTable.cxx:1729
 TQTable.cxx:1730
 TQTable.cxx:1731
 TQTable.cxx:1732
 TQTable.cxx:1733
 TQTable.cxx:1734
 TQTable.cxx:1735
 TQTable.cxx:1736
 TQTable.cxx:1737
 TQTable.cxx:1738
 TQTable.cxx:1739
 TQTable.cxx:1740
 TQTable.cxx:1741
 TQTable.cxx:1742
 TQTable.cxx:1743
 TQTable.cxx:1744
 TQTable.cxx:1745
 TQTable.cxx:1746
 TQTable.cxx:1747
 TQTable.cxx:1748
 TQTable.cxx:1749
 TQTable.cxx:1750
 TQTable.cxx:1751
 TQTable.cxx:1752
 TQTable.cxx:1753
 TQTable.cxx:1754
 TQTable.cxx:1755
 TQTable.cxx:1756
 TQTable.cxx:1757
 TQTable.cxx:1758
 TQTable.cxx:1759
 TQTable.cxx:1760
 TQTable.cxx:1761
 TQTable.cxx:1762
 TQTable.cxx:1763
 TQTable.cxx:1764
 TQTable.cxx:1765
 TQTable.cxx:1766
 TQTable.cxx:1767
 TQTable.cxx:1768
 TQTable.cxx:1769
 TQTable.cxx:1770
 TQTable.cxx:1771
 TQTable.cxx:1772
 TQTable.cxx:1773
 TQTable.cxx:1774
 TQTable.cxx:1775
 TQTable.cxx:1776
 TQTable.cxx:1777
 TQTable.cxx:1778
 TQTable.cxx:1779
 TQTable.cxx:1780
 TQTable.cxx:1781
 TQTable.cxx:1782
 TQTable.cxx:1783
 TQTable.cxx:1784
 TQTable.cxx:1785
 TQTable.cxx:1786
 TQTable.cxx:1787
 TQTable.cxx:1788
 TQTable.cxx:1789
 TQTable.cxx:1790
 TQTable.cxx:1791
 TQTable.cxx:1792
 TQTable.cxx:1793
 TQTable.cxx:1794
 TQTable.cxx:1795
 TQTable.cxx:1796
 TQTable.cxx:1797
 TQTable.cxx:1798
 TQTable.cxx:1799
 TQTable.cxx:1800
 TQTable.cxx:1801
 TQTable.cxx:1802
 TQTable.cxx:1803
 TQTable.cxx:1804
 TQTable.cxx:1805
 TQTable.cxx:1806
 TQTable.cxx:1807
 TQTable.cxx:1808
 TQTable.cxx:1809
 TQTable.cxx:1810
 TQTable.cxx:1811
 TQTable.cxx:1812
 TQTable.cxx:1813
 TQTable.cxx:1814
 TQTable.cxx:1815
 TQTable.cxx:1816
 TQTable.cxx:1817
 TQTable.cxx:1818
 TQTable.cxx:1819
 TQTable.cxx:1820
 TQTable.cxx:1821
 TQTable.cxx:1822
 TQTable.cxx:1823
 TQTable.cxx:1824
 TQTable.cxx:1825
 TQTable.cxx:1826
 TQTable.cxx:1827
 TQTable.cxx:1828
 TQTable.cxx:1829
 TQTable.cxx:1830
 TQTable.cxx:1831
 TQTable.cxx:1832
 TQTable.cxx:1833
 TQTable.cxx:1834
 TQTable.cxx:1835
 TQTable.cxx:1836
 TQTable.cxx:1837
 TQTable.cxx:1838
 TQTable.cxx:1839
 TQTable.cxx:1840
 TQTable.cxx:1841
 TQTable.cxx:1842
 TQTable.cxx:1843
 TQTable.cxx:1844
 TQTable.cxx:1845
 TQTable.cxx:1846
 TQTable.cxx:1847
 TQTable.cxx:1848
 TQTable.cxx:1849
 TQTable.cxx:1850
 TQTable.cxx:1851
 TQTable.cxx:1852
 TQTable.cxx:1853
 TQTable.cxx:1854
 TQTable.cxx:1855
 TQTable.cxx:1856
 TQTable.cxx:1857
 TQTable.cxx:1858
 TQTable.cxx:1859
 TQTable.cxx:1860
 TQTable.cxx:1861
 TQTable.cxx:1862
 TQTable.cxx:1863
 TQTable.cxx:1864
 TQTable.cxx:1865
 TQTable.cxx:1866
 TQTable.cxx:1867
 TQTable.cxx:1868
 TQTable.cxx:1869
 TQTable.cxx:1870
 TQTable.cxx:1871
 TQTable.cxx:1872
 TQTable.cxx:1873
 TQTable.cxx:1874
 TQTable.cxx:1875
 TQTable.cxx:1876
 TQTable.cxx:1877
 TQTable.cxx:1878
 TQTable.cxx:1879
 TQTable.cxx:1880
 TQTable.cxx:1881
 TQTable.cxx:1882
 TQTable.cxx:1883
 TQTable.cxx:1884
 TQTable.cxx:1885
 TQTable.cxx:1886
 TQTable.cxx:1887
 TQTable.cxx:1888
 TQTable.cxx:1889
 TQTable.cxx:1890
 TQTable.cxx:1891
 TQTable.cxx:1892
 TQTable.cxx:1893
 TQTable.cxx:1894
 TQTable.cxx:1895
 TQTable.cxx:1896
 TQTable.cxx:1897
 TQTable.cxx:1898
 TQTable.cxx:1899
 TQTable.cxx:1900
 TQTable.cxx:1901
 TQTable.cxx:1902
 TQTable.cxx:1903
 TQTable.cxx:1904
 TQTable.cxx:1905
 TQTable.cxx:1906
 TQTable.cxx:1907
 TQTable.cxx:1908
 TQTable.cxx:1909
 TQTable.cxx:1910
 TQTable.cxx:1911
 TQTable.cxx:1912
 TQTable.cxx:1913
 TQTable.cxx:1914
 TQTable.cxx:1915
 TQTable.cxx:1916
 TQTable.cxx:1917
 TQTable.cxx:1918
 TQTable.cxx:1919
 TQTable.cxx:1920
 TQTable.cxx:1921
 TQTable.cxx:1922
 TQTable.cxx:1923
 TQTable.cxx:1924
 TQTable.cxx:1925
 TQTable.cxx:1926
 TQTable.cxx:1927
 TQTable.cxx:1928
 TQTable.cxx:1929
 TQTable.cxx:1930
 TQTable.cxx:1931
 TQTable.cxx:1932
 TQTable.cxx:1933
 TQTable.cxx:1934
 TQTable.cxx:1935
 TQTable.cxx:1936
 TQTable.cxx:1937
 TQTable.cxx:1938
 TQTable.cxx:1939
 TQTable.cxx:1940
 TQTable.cxx:1941
 TQTable.cxx:1942
 TQTable.cxx:1943
 TQTable.cxx:1944
 TQTable.cxx:1945
 TQTable.cxx:1946
 TQTable.cxx:1947
 TQTable.cxx:1948
 TQTable.cxx:1949
 TQTable.cxx:1950
 TQTable.cxx:1951
 TQTable.cxx:1952
 TQTable.cxx:1953
 TQTable.cxx:1954
 TQTable.cxx:1955
 TQTable.cxx:1956
 TQTable.cxx:1957
 TQTable.cxx:1958
 TQTable.cxx:1959
 TQTable.cxx:1960
 TQTable.cxx:1961
 TQTable.cxx:1962
 TQTable.cxx:1963
 TQTable.cxx:1964
 TQTable.cxx:1965
 TQTable.cxx:1966
 TQTable.cxx:1967
 TQTable.cxx:1968
 TQTable.cxx:1969
 TQTable.cxx:1970
 TQTable.cxx:1971
 TQTable.cxx:1972
 TQTable.cxx:1973
 TQTable.cxx:1974
 TQTable.cxx:1975
 TQTable.cxx:1976
 TQTable.cxx:1977
 TQTable.cxx:1978
 TQTable.cxx:1979
 TQTable.cxx:1980
 TQTable.cxx:1981
 TQTable.cxx:1982
 TQTable.cxx:1983
 TQTable.cxx:1984
 TQTable.cxx:1985
 TQTable.cxx:1986
 TQTable.cxx:1987
 TQTable.cxx:1988
 TQTable.cxx:1989