]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgr.h
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
[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 //++
11 // File:        MICmdMgr.h
12 //
13 // Overview:    CMICmdMgr interface.
14 //
15 // Environment: Compilers:  Visual C++ 12.
16 //                          gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 //              Libraries:  See MIReadmetxt.
18 //
19 // Copyright:   None.
20 //--
21
22 #pragma once
23
24 // Third party headers
25 #include <set>
26
27 // In-house headers:
28 #include "MICmnBase.h"
29 #include "MICmdBase.h"
30 #include "MICmdMgrSetCmdDeleteCallback.h"
31 #include "MIUtilSingletonBase.h"
32
33 // Declarations:
34 class CMICmdInterpreter;
35 class CMICmdFactory;
36 class CMICmdInvoker;
37 class CMICmdBase;
38
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.
44 //          A singleton class.
45 // Gotchas: None.
46 // Authors: Illya Rudkin 19/02/2014.
47 // Changes: None.
48 //--
49 class CMICmdMgr : public CMICmnBase, public MI::ISingleton<CMICmdMgr>
50 {
51     friend class MI::ISingleton<CMICmdMgr>;
52
53     // Methods:
54   public:
55     bool Initialize(void);
56     bool Shutdown(void);
57
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);
63
64     // Methods:
65   private:
66     /* ctor */ CMICmdMgr(void);
67     /* ctor */ CMICmdMgr(const CMICmdMgr &);
68     void operator=(const CMICmdMgr &);
69
70     // Overridden:
71   public:
72     // From CMICmnBase
73     /* dtor */ virtual ~CMICmdMgr(void);
74
75     // Attributes:
76   private:
77     CMICmdInterpreter &m_interpretor;
78     CMICmdFactory &m_factory;
79     CMICmdInvoker &m_invoker;
80     CMICmdMgrSetCmdDeleteCallback::CSetClients m_setCmdDeleteCallback;
81 };