Show
Ignore:
Timestamp:
01/22/10 19:44:34 (2 years ago)
Author:
sven-win
Message:

Umfangreiche Weiterentwicklung (letzte Entwicklung am Netbook). Driver fuer M200 erstmals testweise implementiert; funktioniert(e mit Netbook).

-- Sven @ netboo

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • punch-card-project/trunk/punch-card-editor/src/qpunchcard/format.h

    r52 r59  
    99        class FileFormat; 
    1010        class FileFormatFactory; 
     11 
     12        class Deck; 
    1113}; 
    1214 
    1315#include "qpunchcard/card.h" 
    14 #include "qpunchcard/deck.h" 
     16// #include "qpunchcard/deck.h" // nach unten verschoben, damit bloeder cc kompiliert 
    1517 
    1618namespace QPunchCard { 
    1719 
    1820class FileFormat { 
     21        QString name; 
     22        friend class FileFormatFactory; 
    1923public: 
    2024        virtual ~FileFormat() {} 
    21         virtual bool write(QFile& /* target */, const Deck& /* source */) const = 0; 
    22         virtual bool read(QFile& /* source */, Deck& /* target */) const = 0; 
     25        virtual bool write(QFile& /* target */, const Deck* /* source */) const { qDebug("Default FileFormat write!"); return false; } 
     26        virtual bool read(QFile& /* source */, Deck* /* target */) const { qDebug("Default FileFormat read!"); return false; } 
     27        const QString& getName() const { return name; } 
     28        bool isNull() const { return name.isNull(); } 
    2329}; 
    2430 
     
    2632public: 
    2733        static QList<QString> availableFormats(); 
    28         static const FileFormat* createFormat(const QString& name); 
     34        static FileFormat createFormat(const QString& name); 
    2935        static QString autoDetectFormat(const QFile& file); 
    3036}; 
    3137 
    3238/**************************************************************************** 
    33   FileFormat (I/O) implementations 
     39  FileFormat (I/O) implementations (see jones.h for the most important one) 
    3440 ***************************************************************************/ 
    35  
    36 class JonesFileFormat : public FileFormat { 
    37 public: 
    38         static int jones_column_to_integer(const Column& col); 
    39         static Column jones_integer_to_column(int integer); 
    40  
    41         bool write(QFile& target, const Deck& source) const; 
    42         bool read(QFile& source, Deck& target) const; 
    43 }; 
    4441 
    4542class PunchCardMarkupLanguageFormat : public FileFormat { 
    4643public: 
    47         bool write(QFile& target, const Deck& source) const { return false; } 
    48         bool read(QFile& source, Deck& target) const { return false; } 
     44        bool write(QFile& target, const Deck* source) const { return false; } 
     45        bool read(QFile& source, Deck* target) const { return false; } 
    4946}; 
    5047 
    5148}; // namespace QPunchCard 
    5249 
     50// hier eingebunden 
     51#include "qpunchcard/deck.h" 
    5352 
    5453#endif // FORMAT_H 
© 2008 - 2010 Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License