1 //===-- MICmdArgValOptionShort.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 "MICmdArgValOptionLong.h"
16 class CMICmdArgContext;
20 //============================================================================
21 // Details: MI common code class. Command argument class. Arguments object
22 // needing specialization derived from the CMICmdArgValOptionLong
24 // An argument knows what type of argument it is and how it is to
25 // interpret the options (context) string to find and validate a
27 // argument and so extract a value from it.
28 // If *this argument has expected options following it the option
30 // created to hold each of those option's values belong to *this
32 // object and so are deleted when *this object goes out of scope.
33 // Based on the Interpreter pattern.
35 class CMICmdArgValOptionShort : public CMICmdArgValOptionLong {
38 /* ctor */ CMICmdArgValOptionShort();
39 /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName,
40 const bool vbMandatory,
41 const bool vbHandleByCmd);
42 /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName,
43 const bool vbMandatory,
44 const bool vbHandleByCmd,
45 const ArgValType_e veType,
46 const MIuint vnExpectingNOptions);
48 bool IsArgShortOption(const CMIUtilString &vrTxt) const;
52 // From CMICmdArgValBase
53 /* dtor */ ~CMICmdArgValOptionShort() override;
57 // From CMICmdArgValOptionLong
58 bool IsArgOptionCorrect(const CMIUtilString &vrTxt) const override;
59 bool ArgNameMatch(const CMIUtilString &vrTxt) const override;