1 //===-- MICmdArgValPrintValues.h --------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
12 #include "MICmdArgValBase.h"
15 class CMICmdArgContext;
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
24 // argument and so extract a value from it. The print-values looks
28 // 2 or --simple-values
29 // Based on the Interpreter pattern.
31 class CMICmdArgValPrintValues : public CMICmdArgValBaseTemplate<MIuint> {
34 /* ctor */ CMICmdArgValPrintValues();
35 /* ctor */ CMICmdArgValPrintValues(const CMIUtilString &vrArgName,
36 const bool vbMandatory,
37 const bool vbHandleByCmd);
39 bool IsArgPrintValues(const CMIUtilString &vrTxt) const;
43 // From CMICmdArgValBase
44 /* dtor */ ~CMICmdArgValPrintValues() override;
45 // From CMICmdArgSet::IArg
46 bool Validate(CMICmdArgContext &vArgContext) override;
50 bool ExtractPrintValues(const CMIUtilString &vrTxt);
51 MIuint GetPrintValues() const;
55 MIuint m_nPrintValues;