]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueTuple.h
Merge ^/head r274961 through r275366.
[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 //++
11 // File:                MICmnMIValueTuple.h
12 //
13 // Overview:    CMICmnMIValueTuple 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 #include "MICmnMIValueConst.h"
28
29 //++ ============================================================================
30 // Details:     MI common code MI Result class. Part of the CMICmnMIValueTupleRecord
31 //                      set of objects.
32 //                      The syntax is as follows:
33 //                      result-record ==>  [ token ] "^" result-class ( "," result )* nl 
34 //                      token = any sequence of digits
35 //                      * = 0 to many
36 //                      nl = CR | CR_LF
37 //                      result-class ==> "done" | "running" | "connected" | "error" | "exit" 
38 //                      result ==> variable "=" value
39 //                      value ==> const | tuple | list  
40 //                      const ==> c-string (7 bit iso c string content)
41 //                      tuple ==>  "{}" | "{" result ( "," result )* "}"  
42 //                      list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"  
43 //                      More information see: 
44 //                      http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
45 // Gotchas:     None.
46 // Authors:     Illya Rudkin 24/02/2014.
47 // Changes:     None.
48 //--
49 class CMICmnMIValueTuple : public CMICmnMIValue
50 {
51 // Methods:
52 public:
53         /* ctor */      CMICmnMIValueTuple( void );
54         /* ctor */      CMICmnMIValueTuple( const CMICmnMIValueResult & vResult );
55         /* ctor */      CMICmnMIValueTuple( const CMICmnMIValueResult & vResult, const bool vbUseSpacing );
56         //
57         bool                    Add( const CMICmnMIValueResult & vResult );
58         bool                    Add( const CMICmnMIValueResult & vResult, const bool vbUseSpacing );
59         bool                    Add( const CMICmnMIValueConst & vValue, const bool vbUseSpacing );
60         CMIUtilString   ExtractContentNoBrackets( void ) const; 
61
62 // Overridden:
63 public:
64         // From CMICmnBase
65         /* dtor */ virtual ~CMICmnMIValueTuple( void );
66
67 // Methods:
68 private:
69         bool BuildTuple( void );
70         bool BuildTuple( const CMICmnMIValueResult & vResult );
71         bool BuildTuple( const CMIUtilString & vValue );
72
73 // Attributes:
74 private:
75         bool m_bSpaceAfterComma;        // True = put space seperators into the string, false = no spaces used
76 };