]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/lldb-mi/MICmnBase.h
Import LLDB as of upstream SVN 241361 (git 612c075f)
[FreeBSD/FreeBSD.git] / tools / lldb-mi / MICmnBase.h
1 //===-- MICmnBase.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 // In-house headers:
13 #include "MIDataTypes.h"
14 #include "MIUtilString.h"
15
16 // Declarations:
17 class CMICmnLog;
18
19 //++ ============================================================================
20 // Details: MI common code implementation base class.
21 // Gotchas: None.
22 // Authors: Illya Rudkin 28/01/2014.
23 // Changes: None.
24 //--
25 class CMICmnBase
26 {
27     // Methods:
28   public:
29     /* ctor */ CMICmnBase(void);
30
31     bool HaveErrorDescription(void) const;
32     const CMIUtilString &GetErrorDescription(void) const;
33     void SetErrorDescription(const CMIUtilString &vrTxt) const;
34     void SetErrorDescriptionn(const CMIUtilString vFormat, ...) const;
35     void SetErrorDescriptionNoLog(const CMIUtilString &vrTxt) const;
36     void ClrErrorDescription(void) const;
37
38     // Overrideable:
39   public:
40     /* dtor */ virtual ~CMICmnBase(void);
41
42     // Attributes:
43   protected:
44     mutable CMIUtilString m_strMILastErrorDescription;
45     bool m_bInitialized;       // True = yes successfully initialized, false = no yet or failed
46     CMICmnLog *m_pLog;         // Allow all derived classes to use the logger
47     MIint m_clientUsageRefCnt; // Count of client using *this object so not shutdown() object to early
48 };