/* * Author: Pawel Jablonski * E-mail: pj@xirx.net * WWW: xirx.net * GIT: git.xirx.net * * License: You can use this code however you like * but leave information about the original author. * Code is free for non-commercial and commercial use. */ #ifndef DATALIST_H #define DATALIST_H #include #include #include "codesection.h" #include "ramitem.h" #include "flashitem.h" #include "data.h" /** * This class contains all parsed data for each source file. * It allows in a simply way to collect all external or global sections of code, RAM items and Flash items. * It contains too a selection of which mode is used to compile the application. */ class DataList : public QList> { public: //! List of possible compile modes enum class Mode { Rom, //!< Flash residing mode. Mostly for kernel. It generates *.map file. App //!< RAM residing mode. Mostly for user applications. It can use *.map files. }; DataList(Mode mode); Mode getMode() const; bool addExternalCodeSection(const QSharedPointer &codeSection); bool addExternalRamItem(const QSharedPointer &ramItem); bool addExternalFlashItem(const QSharedPointer &flashItem); bool addGlobalCodeSection(const QSharedPointer &codeSection); bool addGlobalRamItem(const QSharedPointer &ramItem); bool addGlobalFlashItem(const QSharedPointer &flashItem); QList> &getExternalCodeSectionList(); QList> &getExternalRamItemList(); QList> &getExternalFlashItemList(); QList> &getGlobalCodeSectionList(); QList> &getGlobalRamItemList(); QList> &getGlobalFlashItemList(); private: Mode mode; //!< Which mode is used to compilation the code QList> externalCodeSectionList; //!< List of external code sections QList> externalRamItemList; //!< List of external RAM items QList> externalFlashItemList; //!< List of external Flash items QList> globalCodeSectionList; //!< List of global code section QList> globalRamItemList; //!< List of global RAM item QList> globalFlashItemList; //!< List of global Flash items }; #endif