]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnBase.h
Upgrade our copy of clang and llvm to 3.5.1 release. This is a bugfix
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / 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 //++
11 // File:                MICmnBase.h
12 //
13 // Overview:    CMICmnBase 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 // In-house headers:
25 #include "MIDataTypes.h"  
26 #include "MIUtilString.h"
27
28 // Declarations:
29 class CMICmnLog;
30
31 //++ ============================================================================
32 // Details:     MI common code implementation base class.
33 // Gotchas:     None.
34 // Authors:     Illya Rudkin 28/01/2014.
35 // Changes:     None.
36 //--
37 class CMICmnBase
38 {
39 // Methods:
40 public:
41         /* ctor */      CMICmnBase( void );
42         
43         bool                                    HaveErrorDescription( void ) const;
44         const CMIUtilString &   GetErrorDescription( void ) const;
45         void                                    SetErrorDescription( const CMIUtilString & vrTxt ) const;
46         void                                    SetErrorDescriptionn( const CMIUtilString & vrFormat, ... ) const;
47         void                                    SetErrorDescriptionNoLog( const CMIUtilString & vrTxt ) const;
48         void                                    ClrErrorDescription( void ) const;
49
50 // Overrideable:
51 public:
52         /* dtor */ virtual ~CMICmnBase( void );
53
54 // Attributes:
55 protected:
56         mutable CMIUtilString   m_strMILastErrorDescription;
57         bool                                    m_bInitialized;                                 // True = yes successfully initialized, false = no yet or failed
58         CMICmnLog *                             m_pLog;                                                 // Allow all derived classes to use the logger
59         MIint                                   m_clientUsageRefCnt;                    // Count of client using *this object so not shutdown() object to early
60 };