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 "MICmnMIValueResult.h"
15 #include "MICmnMIValueConst.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 ( "," result )* "]"
31 // More information see:
32 // http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
34 // Authors: Illya Rudkin 24/02/2014.
37 class CMICmnMIValueTuple : public CMICmnMIValue
41 /* ctor */ CMICmnMIValueTuple(void);
42 /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult);
43 /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult, const bool vbUseSpacing);
45 bool Add(const CMICmnMIValueResult &vResult);
46 bool Add(const CMICmnMIValueResult &vResult, const bool vbUseSpacing);
47 bool Add(const CMICmnMIValueConst &vValue, const bool vbUseSpacing);
48 CMIUtilString ExtractContentNoBrackets(void) const;
53 /* dtor */ ~CMICmnMIValueTuple(void) override;
57 bool BuildTuple(void);
58 bool BuildTuple(const CMICmnMIValueResult &vResult);
59 bool BuildTuple(const CMIUtilString &vValue);
63 bool m_bSpaceAfterComma; // True = put space separators into the string, false = no spaces used