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;
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 matching
23 // argument and so extract a value from it. The print-values looks like:
26 // 2 or --simple-values
27 // Based on the Interpreter pattern.
29 class CMICmdArgValPrintValues : public CMICmdArgValBaseTemplate<MIuint>
33 /* ctor */ CMICmdArgValPrintValues(void);
34 /* ctor */ CMICmdArgValPrintValues(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd);
36 bool IsArgPrintValues(const CMIUtilString &vrTxt) const;
40 // From CMICmdArgValBase
41 /* dtor */ virtual ~CMICmdArgValPrintValues(void);
42 // From CMICmdArgSet::IArg
43 virtual bool Validate(CMICmdArgContext &vArgContext);
47 bool ExtractPrintValues(const CMIUtilString &vrTxt);
48 MIuint GetPrintValues(void) const;
52 MIuint m_nPrintValues;