1 //===-- MICmdArgValConsume.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. This type having recognised its argument name just
27 // that argument or option (ignores it). This is the so the validation
28 // process can then ask if all arguments or options have been
30 // other an error will occurred "argument not recognised". For example
31 // this can be used to consume the "--" text which is not an argument
33 // itself. Normally the GetValue() function (in base class) would
35 // a value for the argument but is not the case for *this argument type
37 // Based on the Interpreter pattern.
39 class CMICmdArgValConsume : public CMICmdArgValBaseTemplate<CMIUtilString> {
42 /* ctor */ CMICmdArgValConsume();
43 /* ctor */ CMICmdArgValConsume(const CMIUtilString &vrArgName,
44 const bool vbMandatory);
50 // From CMICmdArgValBase
51 /* dtor */ ~CMICmdArgValConsume() override;
52 // From CMICmdArgSet::IArg
53 bool Validate(CMICmdArgContext &vwArgContext) override;