1 //===-- MICmdMgr.h ----------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // Third party headers
15 #include "MICmdBase.h"
16 #include "MICmdMgrSetCmdDeleteCallback.h"
17 #include "MICmnBase.h"
18 #include "MIUtilSingletonBase.h"
21 class CMICmdInterpreter;
27 //============================================================================
28 // Details: MI command manager. Oversees command operations, controls command
29 // production and the running of commands.
30 // Command Invoker, Command Factory and Command Monitor while
32 // units are overseen/managed by *this manager.
35 class CMICmdMgr : public CMICmnBase, public MI::ISingleton<CMICmdMgr> {
36 friend class MI::ISingleton<CMICmdMgr>;
40 bool Initialize() override;
41 bool Shutdown() override;
43 bool CmdInterpret(const CMIUtilString &vTextLine, bool &vwbYesValid,
44 bool &vwbCmdNotInCmdFactor, SMICmdData &rwCmdData);
45 bool CmdExecute(const SMICmdData &vCmdData);
46 bool CmdDelete(SMICmdData vCmdData);
47 bool CmdRegisterForDeleteNotification(
48 CMICmdMgrSetCmdDeleteCallback::ICallback &vObject);
49 bool CmdUnregisterForDeleteNotification(
50 CMICmdMgrSetCmdDeleteCallback::ICallback &vObject);
54 /* ctor */ CMICmdMgr();
55 /* ctor */ CMICmdMgr(const CMICmdMgr &);
56 void operator=(const CMICmdMgr &);
61 /* dtor */ ~CMICmdMgr() override;
65 CMICmdInterpreter &m_interpretor;
66 CMICmdFactory &m_factory;
67 CMICmdInvoker &m_invoker;
68 CMICmdMgrSetCmdDeleteCallback::CSetClients m_setCmdDeleteCallback;