]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/tools/lldb-mi/MICmdArgValPrintValues.h
Unbreak DRM KMS build by adding the needed compatibility field in the LinuxKPI.
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / tools / lldb-mi / MICmdArgValPrintValues.h
1 //===-- MICmdArgValPrintValues.h --------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #pragma once
10
11 // In-house headers:
12 #include "MICmdArgValBase.h"
13
14 // Declarations:
15 class CMICmdArgContext;
16
17 //++
18 //============================================================================
19 // Details: MI common code class. Command argument class. Arguments object
20 //          needing specialization derived from the CMICmdArgValBase class.
21 //          An argument knows what type of argument it is and how it is to
22 //          interpret the options (context) string to find and validate a
23 //          matching
24 //          argument and so extract a value from it. The print-values looks
25 //          like:
26 //            0 or --no-values
27 //            1 or --all-values
28 //            2 or --simple-values
29 //          Based on the Interpreter pattern.
30 //--
31 class CMICmdArgValPrintValues : public CMICmdArgValBaseTemplate<MIuint> {
32   // Methods:
33 public:
34   /* ctor */ CMICmdArgValPrintValues();
35   /* ctor */ CMICmdArgValPrintValues(const CMIUtilString &vrArgName,
36                                      const bool vbMandatory,
37                                      const bool vbHandleByCmd);
38   //
39   bool IsArgPrintValues(const CMIUtilString &vrTxt) const;
40
41   // Overridden:
42 public:
43   // From CMICmdArgValBase
44   /* dtor */ ~CMICmdArgValPrintValues() override;
45   // From CMICmdArgSet::IArg
46   bool Validate(CMICmdArgContext &vArgContext) override;
47
48   // Methods:
49 private:
50   bool ExtractPrintValues(const CMIUtilString &vrTxt);
51   MIuint GetPrintValues() const;
52
53   // Attributes:
54 private:
55   MIuint m_nPrintValues;
56 };