1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
/*
* mobiledb.h
*
* (c) 2002,2009 by Jeremy Bowman <jmbowman@alum.mit.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
/** @file mobiledb.h
* Header file for MobileDBFile
*/
#ifndef MOBILEDB_H
#define MOBILEDB_H
#include <QStringList>
#include "pdbfile.h"
/**
* Parser for MobileDB database files.
*/
class MobileDBFile : public PDBFile
{
public:
MobileDBFile(const QString &f);
bool read();
int row_count() const;
int col_count() const;
const char* db_info();
QStringList field_types() const;
const int* field_lengths() const;
QStringList row(int i);
QStringList field_labels() const;
protected:
bool verify_recordhdr(const unsigned char *raw_record) const;
virtual bool readMobileDBHeader();
int record_category(int i);
protected:
int colcount; /**< The number of columns in the database */
int rowcount; /**< The number of rows in the database */
QStringList fieldlabels; /**< The column names */
QStringList fieldtypes; /**< The column types (as written in the file) */
int fieldlengths[20]; /**< The column display widths, in pixels */
};
#endif
|