1 //===-- MICmnMIResult.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
13 #include "MICmnMIValue.h"
16 //============================================================================
17 // Details: MI common code MI Result class. Part of the
18 // CMICmnMIValueResultRecord
20 // The syntax is as follows:
21 // result-record ==> [ token ] "^" result-class ( "," result )* nl
22 // token = any sequence of digits
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 ( ","
32 // More information see:
33 // http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
35 class CMICmnMIValueResult : public CMICmnMIValue {
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);
45 void Add(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
50 /* dtor */ ~CMICmnMIValueResult() override;
55 void BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
59 static const CMIUtilString ms_constStrEqual;
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