1 //===-- MICmnMIResult.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 //===----------------------------------------------------------------------===//
13 #include "MICmnMIValue.h"
15 //++ ============================================================================
16 // Details: MI common code MI Result class. Part of the CMICmnMIValueResultRecord
18 // The syntax is as follows:
19 // result-record ==> [ token ] "^" result-class ( "," result )* nl
20 // token = any sequence of digits
23 // result-class ==> "done" | "running" | "connected" | "error" | "exit"
24 // result ==> variable "=" value
25 // value ==> const | tuple | list
26 // const ==> c-string (7 bit iso c string content)
27 // tuple ==> "{}" | "{" result ( "," result )* "}"
28 // list ==> "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"
29 // More information see:
30 // http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
32 // Authors: Illya Rudkin 24/02/2014.
35 class CMICmnMIValueResult : public CMICmnMIValue
39 /* ctor */ CMICmnMIValueResult(void);
40 /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
41 /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue, const bool vbUseSpacing);
43 bool Add(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
48 /* dtor */ ~CMICmnMIValueResult(void) override;
52 bool BuildResult(void);
53 bool BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
57 static const CMIUtilString ms_constStrEqual;
59 CMIUtilString m_strPartVariable;
60 CMICmnMIValue m_partMIValue;
61 bool m_bEmptyConstruction; // True = *this object used constructor with no parameters, false = constructor with parameters
62 bool m_bUseSpacing; // True = put space separators into the string, false = no spaces used