1 //===-- MICmnMIValueTuple.h -------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // File: MICmnMIValueTuple.h
13 // Overview: CMICmnMIValueTuple interface.
15 // Environment: Compilers: Visual C++ 12.
16 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 // Libraries: See MIReadmetxt.
25 #include "MICmnMIValue.h"
26 #include "MICmnMIValueResult.h"
27 #include "MICmnMIValueConst.h"
29 //++ ============================================================================
30 // Details: MI common code MI Result class. Part of the CMICmnMIValueTupleRecord
32 // The syntax is as follows:
33 // result-record ==> [ token ] "^" result-class ( "," result )* nl
34 // token = any sequence of digits
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
46 // Authors: Illya Rudkin 24/02/2014.
49 class CMICmnMIValueTuple : public CMICmnMIValue
53 /* ctor */ CMICmnMIValueTuple( void );
54 /* ctor */ CMICmnMIValueTuple( const CMICmnMIValueResult & vResult );
55 /* ctor */ CMICmnMIValueTuple( const CMICmnMIValueResult & vResult, const bool vbUseSpacing );
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;
65 /* dtor */ virtual ~CMICmnMIValueTuple( void );
69 bool BuildTuple( void );
70 bool BuildTuple( const CMICmnMIValueResult & vResult );
71 bool BuildTuple( const CMIUtilString & vValue );
75 bool m_bSpaceAfterComma; // True = put space seperators into the string, false = no spaces used