1 //===-- MICmnMIValueTuple.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"
14 #include "MICmnMIValueConst.h"
15 #include "MICmnMIValueResult.h"
18 //============================================================================
19 // Details: MI common code MI Result class. Part of the CMICmnMIValueTupleRecord
21 // The syntax is as follows:
22 // result-record ==> [ token ] "^" result-class ( "," result )* nl
23 // token = any sequence of digits
26 // result-class ==> "done" | "running" | "connected" | "error" | "exit"
27 // result ==> variable "=" value
28 // value ==> const | tuple | list
29 // const ==> c-string (7 bit iso c string content)
30 // tuple ==> "{}" | "{" result ( "," result )* "}"
31 // list ==> "[]" | "[" value ( "," value )* "]" | "[" result ( ","
33 // More information see:
34 // http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
36 class CMICmnMIValueTuple : public CMICmnMIValue {
39 /* ctor */ CMICmnMIValueTuple();
40 /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult);
41 /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult,
42 const bool vbUseSpacing);
44 void Add(const CMICmnMIValueResult &vResult);
45 void Add(const CMICmnMIValueResult &vResult, const bool vbUseSpacing);
46 void Add(const CMICmnMIValueConst &vValue, const bool vbUseSpacing);
47 CMIUtilString ExtractContentNoBrackets() const;
52 /* dtor */ ~CMICmnMIValueTuple() override;
57 void BuildTuple(const CMICmnMIValueResult &vResult);
58 void BuildTuple(const CMIUtilString &vValue);
62 bool m_bSpaceAfterComma; // True = put space separators into the string, false