1 //===-- MICmnMIValueResult.h ------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 #include "MICmnMIValue.h"
15 //============================================================================
16 // Details: MI common code MI Result class. Part of the
17 // CMICmnMIValueResultRecord
19 // The syntax is as follows:
20 // result-record ==> [ token ] "^" result-class ( "," result )* nl
21 // token = any sequence of digits
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 ( ","
31 // More information see:
32 // http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
34 class CMICmnMIValueResult : public CMICmnMIValue {
37 /* ctor */ CMICmnMIValueResult();
38 /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable,
39 const CMICmnMIValue &vValue);
40 /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable,
41 const CMICmnMIValue &vValue,
42 const bool vbUseSpacing);
44 void Add(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
49 /* dtor */ ~CMICmnMIValueResult() override;
54 void BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
58 static const CMIUtilString ms_constStrEqual;
60 CMIUtilString m_strPartVariable;
61 CMICmnMIValue m_partMIValue;
62 bool m_bEmptyConstruction; // True = *this object used constructor with no
63 // parameters, false = constructor with parameters
64 bool m_bUseSpacing; // True = put space separators into the string, false = no