]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueTuple.h
Update to ELF Tool Chain r3668
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmnMIValueTuple.h
1 //===-- MICmnMIValueTuple.h -------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #pragma once
11
12 // In-house headers:
13 #include "MICmnMIValue.h"
14 #include "MICmnMIValueConst.h"
15 #include "MICmnMIValueResult.h"
16
17 //++
18 //============================================================================
19 // Details: MI common code MI Result class. Part of the CMICmnMIValueTupleRecord
20 //          set of objects.
21 //          The syntax is as follows:
22 //          result-record ==>  [ token ] "^" result-class ( "," result )* nl
23 //          token = any sequence of digits
24 //          * = 0 to many
25 //          nl = CR | CR_LF
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 ( ","
32 //          result )* "]"
33 //          More information see:
34 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
35 //--
36 class CMICmnMIValueTuple : public CMICmnMIValue {
37   // Methods:
38 public:
39   /* ctor */ CMICmnMIValueTuple();
40   /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult);
41   /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult,
42                                 const bool vbUseSpacing);
43   //
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;
48
49   // Overridden:
50 public:
51   // From CMICmnBase
52   /* dtor */ ~CMICmnMIValueTuple() override;
53
54   // Methods:
55 private:
56   void BuildTuple();
57   void BuildTuple(const CMICmnMIValueResult &vResult);
58   void BuildTuple(const CMIUtilString &vValue);
59
60   // Attributes:
61 private:
62   bool m_bSpaceAfterComma; // True = put space separators into the string, false
63                            // = no spaces used
64 };