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