1 //===-- MICmdArgValPrintValues.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 "MICmdArgValBase.h"
16 class CMICmdArgContext;
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
25 // argument and so extract a value from it. The print-values looks
29 // 2 or --simple-values
30 // Based on the Interpreter pattern.
32 class CMICmdArgValPrintValues : public CMICmdArgValBaseTemplate<MIuint> {
35 /* ctor */ CMICmdArgValPrintValues();
36 /* ctor */ CMICmdArgValPrintValues(const CMIUtilString &vrArgName,
37 const bool vbMandatory,
38 const bool vbHandleByCmd);
40 bool IsArgPrintValues(const CMIUtilString &vrTxt) const;
44 // From CMICmdArgValBase
45 /* dtor */ ~CMICmdArgValPrintValues() override;
46 // From CMICmdArgSet::IArg
47 bool Validate(CMICmdArgContext &vArgContext) override;
51 bool ExtractPrintValues(const CMIUtilString &vrTxt);
52 MIuint GetPrintValues() const;
56 MIuint m_nPrintValues;