1 /*************************************************************************** 2 * Copyright (C) 2003-2005 by David Saxton * 3 * david@bluehaze.org * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 ***************************************************************************/ 10 11 #ifndef MICROLIBRARY_H 12 #define MICROLIBRARY_H 13 14 #include "asminfo.h" 15 #include "microinfo.h" 16 17 #include <QString> 18 #include <QStringList> 19 #include <QList> 20 21 class MicroInfo; 22 class MicroLibrary; 23 typedef QList<MicroInfo*> MicroInfoList; 24 25 inline MicroLibrary *microLibrary(); 26 27 /** 28 @short Stores all the avaiable PICs (info) 29 @author David Saxton 30 */ 31 class MicroLibrary 32 { 33 public: 34 static MicroLibrary * self(); 35 36 ~MicroLibrary(); 37 38 MicroInfo *microInfoWithID( QString id ); 39 void addMicroInfo( MicroInfo *microInfo ); 40 41 /** 42 * Returns a list of micro ids with the given properties (OR'ed 43 * together). 44 */ 45 QStringList microIDs( unsigned asmSet = AsmInfo::AsmSetAll, unsigned gpsimSupport = MicroInfo::AllSupport, unsigned flowCodeSupport = MicroInfo::AllSupport, unsigned microbeSupport = MicroInfo::AllSupport ); 46 47 public: 48 MicroLibrary(); 49 private: 50 // static MicroLibrary * m_pSelf; 51 52 MicroInfoList m_microInfoList; 53 friend MicroLibrary *microLibrary(); 54 }; 55 56 #endif 57