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;
19 //++ ============================================================================
20 // Details: MI common code class. Command argument class. Arguments object
21 // needing specialization derived from the CMICmdArgValOptionLong 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 matching
24 // argument and so extract a value from it.
25 // If *this argument has expected options following it the option objects
26 // created to hold each of those option's values belong to *this argument
27 // object and so are deleted when *this object goes out of scope.
28 // Based on the Interpreter pattern.
30 class CMICmdArgValOptionShort : public CMICmdArgValOptionLong
34 /* ctor */ CMICmdArgValOptionShort();
35 /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd);
36 /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd,
37 const ArgValType_e veType, const MIuint vnExpectingNOptions);
39 bool IsArgShortOption(const CMIUtilString &vrTxt) const;
43 // From CMICmdArgValBase
44 /* dtor */ ~CMICmdArgValOptionShort() override;
48 // From CMICmdArgValOptionLong
49 bool IsArgOptionCorrect(const CMIUtilString &vrTxt) const override;
50 bool ArgNameMatch(const CMIUtilString &vrTxt) const override;