]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/lldb-mi/MICmdArgValPrintValues.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / tools / lldb-mi / MICmdArgValPrintValues.h
1 //===-- MICmdArgValPrintValues.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 "MICmdArgValBase.h"
14
15 // Declarations:
16 class CMICmdArgContext;
17
18 //++
19 //============================================================================
20 // Details: MI common code class. Command argument class. Arguments object
21 //          needing specialization derived from the CMICmdArgValBase class.
22 //          An argument knows what type of argument it is and how it is to
23 //          interpret the options (context) string to find and validate a
24 //          matching
25 //          argument and so extract a value from it. The print-values looks
26 //          like:
27 //            0 or --no-values
28 //            1 or --all-values
29 //            2 or --simple-values
30 //          Based on the Interpreter pattern.
31 //--
32 class CMICmdArgValPrintValues : public CMICmdArgValBaseTemplate<MIuint> {
33   // Methods:
34 public:
35   /* ctor */ CMICmdArgValPrintValues();
36   /* ctor */ CMICmdArgValPrintValues(const CMIUtilString &vrArgName,
37                                      const bool vbMandatory,
38                                      const bool vbHandleByCmd);
39   //
40   bool IsArgPrintValues(const CMIUtilString &vrTxt) const;
41
42   // Overridden:
43 public:
44   // From CMICmdArgValBase
45   /* dtor */ ~CMICmdArgValPrintValues() override;
46   // From CMICmdArgSet::IArg
47   bool Validate(CMICmdArgContext &vArgContext) override;
48
49   // Methods:
50 private:
51   bool ExtractPrintValues(const CMIUtilString &vrTxt);
52   MIuint GetPrintValues() const;
53
54   // Attributes:
55 private:
56   MIuint m_nPrintValues;
57 };