]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueTuple.h
Update llvm, clang and lldb to 3.7.0 release.
[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 "MICmnMIValueResult.h"
15 #include "MICmnMIValueConst.h"
16
17 //++ ============================================================================
18 // Details: MI common code MI Result class. Part of the CMICmnMIValueTupleRecord
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 ( "," result )* "]"
31 //          More information see:
32 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
33 // Gotchas: None.
34 // Authors: Illya Rudkin 24/02/2014.
35 // Changes: None.
36 //--
37 class CMICmnMIValueTuple : public CMICmnMIValue
38 {
39     // Methods:
40   public:
41     /* ctor */ CMICmnMIValueTuple(void);
42     /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult);
43     /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult, const bool vbUseSpacing);
44     //
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;
49
50     // Overridden:
51   public:
52     // From CMICmnBase
53     /* dtor */ ~CMICmnMIValueTuple(void) override;
54
55     // Methods:
56   private:
57     bool BuildTuple(void);
58     bool BuildTuple(const CMICmnMIValueResult &vResult);
59     bool BuildTuple(const CMIUtilString &vValue);
60
61     // Attributes:
62   private:
63     bool m_bSpaceAfterComma; // True = put space separators into the string, false = no spaces used
64 };