File indexing completed on 2024-04-28 09:38:58

0001 /***************************************************************************
0002  *   Copyright (C) 2003-2005 by David Saxton                               *
0003  *   david@bluehaze.org                                                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #ifndef MICROLIBRARY_H
0012 #define MICROLIBRARY_H
0013 
0014 #include "asminfo.h"
0015 #include "microinfo.h"
0016 
0017 #include <QList>
0018 #include <QString>
0019 #include <QStringList>
0020 
0021 class MicroInfo;
0022 class MicroLibrary;
0023 typedef QList<MicroInfo *> MicroInfoList;
0024 
0025 inline MicroLibrary *microLibrary();
0026 
0027 /**
0028 @short Stores all the avaiable PICs (info)
0029 @author David Saxton
0030 */
0031 class MicroLibrary
0032 {
0033 public:
0034     static MicroLibrary *self();
0035 
0036     ~MicroLibrary();
0037 
0038     MicroInfo *microInfoWithID(QString id);
0039     void addMicroInfo(MicroInfo *microInfo);
0040 
0041     /**
0042      * Returns a list of micro ids with the given properties (OR'ed
0043      * together).
0044      */
0045     QStringList microIDs(unsigned asmSet = AsmInfo::AsmSetAll, unsigned gpsimSupport = MicroInfo::AllSupport, unsigned flowCodeSupport = MicroInfo::AllSupport, unsigned microbeSupport = MicroInfo::AllSupport);
0046 
0047 public:
0048     MicroLibrary();
0049 
0050 private:
0051     //      static MicroLibrary * m_pSelf;
0052 
0053     MicroInfoList m_microInfoList;
0054     friend MicroLibrary *microLibrary();
0055 };
0056 
0057 #endif