]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/lldb-mi/MICmnMIValueResult.h
Vendor import of lldb trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / 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 #pragma once
11
12 // In-house headers:
13 #include "MICmnMIValue.h"
14
15 //++
16 //============================================================================
17 // Details: MI common code MI Result class. Part of the
18 // CMICmnMIValueResultRecord
19 //          set of objects.
20 //          The syntax is as follows:
21 //          result-record ==>  [ token ] "^" result-class ( "," result )* nl
22 //          token = any sequence of digits
23 //          * = 0 to many
24 //          nl = CR | CR_LF
25 //          result-class ==> "done" | "running" | "connected" | "error" | "exit"
26 //          result ==> variable "=" value
27 //          value ==> const | tuple | list
28 //          const ==> c-string (7 bit iso c string content)
29 //          tuple ==>  "{}" | "{" result ( "," result )* "}"
30 //          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
31 //          result )* "]"
32 //          More information see:
33 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
34 //--
35 class CMICmnMIValueResult : public CMICmnMIValue {
36   // Methods:
37 public:
38   /* ctor */ CMICmnMIValueResult();
39   /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable,
40                                  const CMICmnMIValue &vValue);
41   /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable,
42                                  const CMICmnMIValue &vValue,
43                                  const bool vbUseSpacing);
44   //
45   void Add(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
46
47   // Overridden:
48 public:
49   // From CMICmnBase
50   /* dtor */ ~CMICmnMIValueResult() override;
51
52   // Methods:
53 private:
54   void BuildResult();
55   void BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
56
57   // Attributes:
58 private:
59   static const CMIUtilString ms_constStrEqual;
60   //
61   CMIUtilString m_strPartVariable;
62   CMICmnMIValue m_partMIValue;
63   bool m_bEmptyConstruction; // True = *this object used constructor with no
64                              // parameters, false = constructor with parameters
65   bool m_bUseSpacing; // True = put space separators into the string, false = no
66                       // spaces used
67 };