]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueResult.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 / MICmnMIValueResult.h
1 //===-- MICmnMIResult.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:                MICmnMIResult.h
12 //
13 // Overview:    CMICmnMIValueResult 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 "MICmnMIValue.h"
26
27 //++ ============================================================================
28 // Details:     MI common code MI Result class. Part of the CMICmnMIValueResultRecord
29 //                      set of objects.
30 //                      The syntax is as follows:
31 //                      result-record ==>  [ token ] "^" result-class ( "," result )* nl 
32 //                      token = any sequence of digits
33 //                      * = 0 to many
34 //                      nl = CR | CR_LF
35 //                      result-class ==> "done" | "running" | "connected" | "error" | "exit" 
36 //                      result ==> variable "=" value
37 //                      value ==> const | tuple | list  
38 //                      const ==> c-string (7 bit iso c string content)
39 //                      tuple ==>  "{}" | "{" result ( "," result )* "}"  
40 //                      list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"  
41 //                      More information see: 
42 //                      http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
43 // Gotchas:     None.
44 // Authors:     Illya Rudkin 24/02/2014.
45 // Changes:     None.
46 //--
47 class CMICmnMIValueResult : public CMICmnMIValue
48 {
49 // Methods:
50 public:
51         /* ctor */      CMICmnMIValueResult( void );
52         /* ctor */      CMICmnMIValueResult( const CMIUtilString & vVariable, const CMICmnMIValue & vValue );
53         /* ctor */      CMICmnMIValueResult( const CMIUtilString & vVariable, const CMICmnMIValue & vValue, const bool vbUseSpacing );
54         //
55         bool    Add( const CMIUtilString & vVariable, const CMICmnMIValue & vValue );
56
57 // Overridden:
58 public:
59         // From CMICmnBase
60         /* dtor */ virtual ~CMICmnMIValueResult( void );
61
62 // Methods:
63 private:
64         bool    BuildResult( void );
65         bool    BuildResult( const CMIUtilString & vVariable, const CMICmnMIValue & vValue );
66
67 // Attributes:
68 private:
69         static const CMIUtilString      ms_constStrEqual;
70         //
71         CMIUtilString   m_strPartVariable;
72         CMICmnMIValue   m_partMIValue;
73         bool                    m_bEmptyConstruction;   // True = *this object used constructor with no parameters, false = constructor with parameters
74         bool                    m_bUseSpacing;                  // True = put space seperators into the string, false = no spaces used
75 };