]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/lldb-mi/MICmnMIValueList.h
Vendor import of lldb trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / tools / lldb-mi / MICmnMIValueList.h
1 //===-- MICmnMIValueList.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 "MICmnMIValueResult.h"
15
16 //++
17 //============================================================================
18 // Details: MI common code MI Result class. Part of the CMICmnMIValueListRecord
19 //          set of objects.
20 //          The syntax is as follows:
21 //          result-record ==>  [ token ] "^" result-class ( "," result )* nl
22 //          token = any sequence of digits
23 //          * = 0 to many
24 //          nl = CR | CR_LF
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 ( ","
31 //          result )* "]"
32 //          More information see:
33 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
34 //--
35 class CMICmnMIValueList : public CMICmnMIValue {
36   // Methods:
37 public:
38   /* ctor */ CMICmnMIValueList(const bool vbValueTypeList);
39   /* ctor */ CMICmnMIValueList(const CMICmnMIValueResult &vResult);
40   /* ctor */ CMICmnMIValueList(const CMICmnMIValue &vValue);
41   //
42   void Add(const CMICmnMIValueResult &vResult);
43   void Add(const CMICmnMIValue &vValue);
44   CMIUtilString ExtractContentNoBrackets() const;
45
46   // Overridden:
47 public:
48   // From CMICmnBase
49   /* dtor */ ~CMICmnMIValueList() override;
50
51   // Methods:
52 private:
53   void BuildList();
54   void BuildList(const CMICmnMIValueResult &vResult);
55   void BuildList(const CMICmnMIValue &vResult);
56 };