1 //===-- MICmnMIValueTuple.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"
13 #include "MICmnMIValueConst.h"
14 #include "MICmnMIValueResult.h"
17 //============================================================================
18 // Details: MI common code MI Result class. Part of the CMICmnMIValueTupleRecord
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 CMICmnMIValueTuple : public CMICmnMIValue {
38 /* ctor */ CMICmnMIValueTuple();
39 /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult);
40 /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult,
41 const bool vbUseSpacing);
43 void Add(const CMICmnMIValueResult &vResult);
44 void Add(const CMICmnMIValueResult &vResult, const bool vbUseSpacing);
45 void Add(const CMICmnMIValueConst &vValue, const bool vbUseSpacing);
46 CMIUtilString ExtractContentNoBrackets() const;
51 /* dtor */ ~CMICmnMIValueTuple() override;
56 void BuildTuple(const CMICmnMIValueResult &vResult);
57 void BuildTuple(const CMIUtilString &vValue);
61 bool m_bSpaceAfterComma; // True = put space separators into the string, false