OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [gui_plugin/] [gui_plugin.h] - Diff between revs 2 and 3

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 3
Line 13... Line 13...
#include "igui.h"
#include "igui.h"
#include "coreservices/ithread.h"
#include "coreservices/ithread.h"
#include "coreservices/isocinfo.h"
#include "coreservices/isocinfo.h"
#include "coreservices/icmdexec.h"
#include "coreservices/icmdexec.h"
#include "MainWindow/DbgMainWindow.h"
#include "MainWindow/DbgMainWindow.h"
 
#include "qt_wrapper.h"
 
 
namespace debugger {
namespace debugger {
 
 
class GuiPlugin : public IService,
class GuiPlugin : public IService,
                  public IThread,
                  public IThread,
Line 25... Line 26...
public:
public:
    GuiPlugin(const char *name);
    GuiPlugin(const char *name);
    ~GuiPlugin();
    ~GuiPlugin();
 
 
    /** IService interface */
    /** IService interface */
    virtual void initService(const AttributeType *args);
 
    virtual void postinitService();
    virtual void postinitService();
 
 
    /** IHap */
    /** IHap */
    virtual void hapTriggered(IFace *isrc, EHapType type, const char *descr);
    virtual void hapTriggered(IFace *isrc, EHapType type, const char *descr);
 
 
    /** IGui interface */
    /** IGui interface */
    virtual IFace *getSocInfo();
    virtual IFace *getSocInfo();
    virtual void getWidgetsAttribute(const char *name, AttributeType *out);
    virtual const AttributeType *getpConfig();
    virtual void registerCommand(IGuiCmdHandler *src, AttributeType *cmd,
    virtual void registerCommand(IGuiCmdHandler *src, AttributeType *cmd,
                                 bool silent);
                                 bool silent);
    virtual void removeFromQueue(IFace *iface);
    virtual void removeFromQueue(IFace *iface);
 
 
    /** IThread interface */
    /** IThread interface */
Line 47... Line 47...
 
 
private:
private:
    bool processCmdQueue();
    bool processCmdQueue();
 
 
private:
private:
    /**
 
     * This UiThread and UiInitDone event allow us to register all widgets
 
     * interfaces before PostInit stage started and as results make them
 
     * visible to all other plugins.
 
     */
 
    class UiThreadType : public IThread {
 
    public:
 
        UiThreadType(IGui *igui, event_def *init_done) {
 
            igui_ = igui;
 
            eventInitDone_ = init_done;
 
            mainWindow_ = 0;
 
        }
 
        DbgMainWindow *mainWindow() { return mainWindow_; }
 
    protected:
 
        /** IThread interface */
 
        virtual void busyLoop();
 
    private:
 
        IGui *igui_;
 
        DbgMainWindow *mainWindow_;
 
        event_def *eventInitDone_;
 
    } *ui_;
 
 
 
    static const int CMD_QUEUE_SIZE = 128;
    static const int CMD_QUEUE_SIZE = 128;
 
 
    AttributeType guiConfig_;
    AttributeType guiConfig_;
    AttributeType socInfo_;
    AttributeType socInfo_;
    AttributeType cmdExecutor_;
    AttributeType cmdExecutor_;
 
 
    ISocInfo *info_;
    ISocInfo *info_;
    ICmdExecutor *iexec_;
    ICmdExecutor *iexec_;
 
    QtWrapper *ui_;
 
 
    event_def eventUiInitDone_;
 
    event_def eventCommandAvailable_;
    event_def eventCommandAvailable_;
    event_def config_done_;
    event_def config_done_;
    mutex_def mutexCommand_;
    mutex_def mutexCommand_;
    struct CmdQueueItemType {
    struct CmdQueueItemType {
        AttributeType cmd;
        AttributeType cmd;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.