]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgr.h
MFV r328253: 8835 Speculative prefetch in ZFS not working for misaligned reads
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdMgr.h
1 //===-- MICmdMgr.h ----------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #pragma once
11
12 // Third party headers
13 #include <set>
14
15 // In-house headers:
16 #include "MICmdBase.h"
17 #include "MICmdMgrSetCmdDeleteCallback.h"
18 #include "MICmnBase.h"
19 #include "MIUtilSingletonBase.h"
20
21 // Declarations:
22 class CMICmdInterpreter;
23 class CMICmdFactory;
24 class CMICmdInvoker;
25 class CMICmdBase;
26
27 //++
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
32 //          independent
33 //          units are overseen/managed by *this manager.
34 //          A singleton class.
35 //--
36 class CMICmdMgr : public CMICmnBase, public MI::ISingleton<CMICmdMgr> {
37   friend class MI::ISingleton<CMICmdMgr>;
38
39   // Methods:
40 public:
41   bool Initialize() override;
42   bool Shutdown() override;
43
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);
52
53   // Methods:
54 private:
55   /* ctor */ CMICmdMgr();
56   /* ctor */ CMICmdMgr(const CMICmdMgr &);
57   void operator=(const CMICmdMgr &);
58
59   // Overridden:
60 public:
61   // From CMICmnBase
62   /* dtor */ ~CMICmdMgr() override;
63
64   // Attributes:
65 private:
66   CMICmdInterpreter &m_interpretor;
67   CMICmdFactory &m_factory;
68   CMICmdInvoker &m_invoker;
69   CMICmdMgrSetCmdDeleteCallback::CSetClients m_setCmdDeleteCallback;
70 };