]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueList.h
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / 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 //++
11 // File:        MICmnMIValueList.h
12 //
13 // Overview:    CMICmnMIValueList interface.
14 //
15 // Environment: Compilers:  Visual C++ 12.
16 //                          gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 //              Libraries:  See MIReadmetxt.
18 //
19 // Copyright:   None.
20 //--
21
22 #pragma once
23
24 // In-house headers:
25 #include "MICmnMIValue.h"
26 #include "MICmnMIValueResult.h"
27
28 //++ ============================================================================
29 // Details: MI common code MI Result class. Part of the CMICmnMIValueListRecord
30 //          set of objects.
31 //          The syntax is as follows:
32 //          result-record ==>  [ token ] "^" result-class ( "," result )* nl
33 //          token = any sequence of digits
34 //          * = 0 to many
35 //          nl = CR | CR_LF
36 //          result-class ==> "done" | "running" | "connected" | "error" | "exit"
37 //          result ==> variable "=" value
38 //          value ==> const | tuple | list
39 //          const ==> c-string (7 bit iso c string content)
40 //          tuple ==>  "{}" | "{" result ( "," result )* "}"
41 //          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"
42 //          More information see:
43 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
44 // Gotchas: None.
45 // Authors: Illya Rudkin 24/02/2014.
46 // Changes: None.
47 //--
48 class CMICmnMIValueList : public CMICmnMIValue
49 {
50     // Methods:
51   public:
52     /* ctor */ CMICmnMIValueList(const bool vbValueTypeList);
53     /* ctor */ CMICmnMIValueList(const CMICmnMIValueResult &vResult);
54     /* ctor */ CMICmnMIValueList(const CMICmnMIValue &vValue);
55     //
56     bool Add(const CMICmnMIValueResult &vResult);
57     bool Add(const CMICmnMIValue &vValue);
58     CMIUtilString ExtractContentNoBrackets(void) const;
59
60     // Overridden:
61   public:
62     // From CMICmnBase
63     /* dtor */ virtual ~CMICmnMIValueList(void);
64
65     // Methods:
66   private:
67     bool BuildList(void);
68     bool BuildList(const CMICmnMIValueResult &vResult);
69     bool BuildList(const CMICmnMIValue &vResult);
70 };