]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueList.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmnMIValueList.h
1 //===-- MICmnMIValueList.h --------------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8
9 #pragma once
10
11 // In-house headers:
12 #include "MICmnMIValue.h"
13 #include "MICmnMIValueResult.h"
14
15 //++
16 //============================================================================
17 // Details: MI common code MI Result class. Part of the CMICmnMIValueListRecord
18 //          set of objects.
19 //          The syntax is as follows:
20 //          result-record ==>  [ token ] "^" result-class ( "," result )* nl
21 //          token = any sequence of digits
22 //          * = 0 to many
23 //          nl = CR | CR_LF
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 ( ","
30 //          result )* "]"
31 //          More information see:
32 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
33 //--
34 class CMICmnMIValueList : public CMICmnMIValue {
35   // Methods:
36 public:
37   /* ctor */ CMICmnMIValueList(const bool vbValueTypeList);
38   /* ctor */ CMICmnMIValueList(const CMICmnMIValueResult &vResult);
39   /* ctor */ CMICmnMIValueList(const CMICmnMIValue &vValue);
40   //
41   void Add(const CMICmnMIValueResult &vResult);
42   void Add(const CMICmnMIValue &vValue);
43   CMIUtilString ExtractContentNoBrackets() const;
44
45   // Overridden:
46 public:
47   // From CMICmnBase
48   /* dtor */ ~CMICmnMIValueList() override;
49
50   // Methods:
51 private:
52   void BuildList();
53   void BuildList(const CMICmnMIValueResult &vResult);
54   void BuildList(const CMICmnMIValue &vResult);
55 };