]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueConst.h
MFV r348568: 9466 add JSON output support to channel programs
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmnMIValueConst.h
1 //===-- MICmnMIValueConst.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 CMICmnMIValueConstRecord
18 //          set of objects.
19 //          The syntax is as follows:
20 //          result-record ==>  [ token ] "^" result-class ( "," result )* nl
21 //          token = any sequence of digits
22 //          * = 0 to many
23 //          nl = CR | CR_LF
24 //          result-class ==> "done" | "running" | "connected" | "error" | "exit"
25 //          result ==> variable "=" value
26 //          value ==> const | tuple | list
27 //          const ==> c-string (7 bit iso c string content)
28 //          tuple ==>  "{}" | "{" result ( "," result )* "}"
29 //          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
30 //          result )* "]"
31 //          More information see:
32 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
33 //
34 //          The text formed in *this Result class is stripped of any '\n'
35 //          characters.
36 //--
37 class CMICmnMIValueConst : public CMICmnMIValue {
38   // Methods:
39 public:
40   /* ctor */ CMICmnMIValueConst(const CMIUtilString &vString);
41   /* ctor */ CMICmnMIValueConst(const CMIUtilString &vString,
42                                 const bool vbNoQuotes);
43
44   // Overridden:
45 public:
46   // From CMICmnBase
47   /* dtor */ ~CMICmnMIValueConst() override;
48
49   // Methods:
50 private:
51   bool BuildConst();
52
53   // Attributes:
54 private:
55   static const CMIUtilString ms_constStrDblQuote;
56   //
57   CMIUtilString m_strPartConst;
58   bool m_bNoQuotes; // True = return string not surrounded with quotes, false =
59                     // use quotes
60 };