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 //===----------------------------------------------------------------------===//
13 // Overview: CMICmdMgr interface.
15 // Environment: Compilers: Visual C++ 12.
16 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 // Libraries: See MIReadmetxt.
24 // Third party headers
28 #include "MICmnBase.h"
29 #include "MICmdBase.h"
30 #include "MICmdMgrSetCmdDeleteCallback.h"
31 #include "MIUtilSingletonBase.h"
34 class CMICmdInterpreter;
39 //++ ============================================================================
40 // Details: MI command manager. Oversees command operations, controls command
41 // production and the running of commands.
42 // Command Invoker, Command Factory and Command Monitor while independant
43 // units are overseen/managed by *this manager.
46 // Authors: Illya Rudkin 19/02/2014.
49 class CMICmdMgr : public CMICmnBase, public MI::ISingleton<CMICmdMgr>
51 friend class MI::ISingleton<CMICmdMgr>;
55 bool Initialize(void);
58 bool CmdInterpret(const CMIUtilString &vTextLine, bool &vwbYesValid, bool &vwbCmdNotInCmdFactor, SMICmdData &rwCmdData);
59 bool CmdExecute(const SMICmdData &vCmdData);
60 bool CmdDelete(SMICmdData vCmdData);
61 bool CmdRegisterForDeleteNotification(CMICmdMgrSetCmdDeleteCallback::ICallback &vObject);
62 bool CmdUnregisterForDeleteNotification(CMICmdMgrSetCmdDeleteCallback::ICallback &vObject);
66 /* ctor */ CMICmdMgr(void);
67 /* ctor */ CMICmdMgr(const CMICmdMgr &);
68 void operator=(const CMICmdMgr &);
73 /* dtor */ virtual ~CMICmdMgr(void);
77 CMICmdInterpreter &m_interpretor;
78 CMICmdFactory &m_factory;
79 CMICmdInvoker &m_invoker;
80 CMICmdMgrSetCmdDeleteCallback::CSetClients m_setCmdDeleteCallback;