1 //===-- MICmdMgr.h ----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // Third party headers
16 #include "MICmdBase.h"
17 #include "MICmdMgrSetCmdDeleteCallback.h"
18 #include "MICmnBase.h"
19 #include "MIUtilSingletonBase.h"
22 class CMICmdInterpreter;
28 //============================================================================
29 // Details: MI command manager. Oversees command operations, controls command
30 // production and the running of commands.
31 // Command Invoker, Command Factory and Command Monitor while
33 // units are overseen/managed by *this manager.
36 class CMICmdMgr : public CMICmnBase, public MI::ISingleton<CMICmdMgr> {
37 friend class MI::ISingleton<CMICmdMgr>;
41 bool Initialize() override;
42 bool Shutdown() override;
44 bool CmdInterpret(const CMIUtilString &vTextLine, bool &vwbYesValid,
45 bool &vwbCmdNotInCmdFactor, SMICmdData &rwCmdData);
46 bool CmdExecute(const SMICmdData &vCmdData);
47 bool CmdDelete(SMICmdData vCmdData);
48 bool CmdRegisterForDeleteNotification(
49 CMICmdMgrSetCmdDeleteCallback::ICallback &vObject);
50 bool CmdUnregisterForDeleteNotification(
51 CMICmdMgrSetCmdDeleteCallback::ICallback &vObject);
55 /* ctor */ CMICmdMgr();
56 /* ctor */ CMICmdMgr(const CMICmdMgr &);
57 void operator=(const CMICmdMgr &);
62 /* dtor */ ~CMICmdMgr() override;
66 CMICmdInterpreter &m_interpretor;
67 CMICmdFactory &m_factory;
68 CMICmdInvoker &m_invoker;
69 CMICmdMgrSetCmdDeleteCallback::CSetClients m_setCmdDeleteCallback;