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 //===----------------------------------------------------------------------===//
11 // File: MICmdArgValOptionShort.h
13 // Overview: CMICmdArgValOptionShort interface.
15 // Environment: Compilers: Visual C++ 12.
16 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 // Libraries: See MIReadmetxt.
25 #include "MICmdArgValOptionLong.h"
28 class CMICmdArgContext;
31 //++ ============================================================================
32 // Details: MI common code class. Command argument class. Arguments object
33 // needing specialization derived from the CMICmdArgValOptionLong class.
34 // An argument knows what type of argument it is and how it is to
35 // interpret the options (context) string to find and validate a matching
36 // argument and so extract a value from it.
37 // If *this argument has expected options following it the option objects
38 // created to hold each of those option's values belong to *this argument
39 // object and so are deleted when *this object goes out of scope.
40 // Based on the Interpreter pattern.
42 // Authors: Illya Rudkin 16/04/2014.
45 class CMICmdArgValOptionShort : public CMICmdArgValOptionLong
49 /* ctor */ CMICmdArgValOptionShort( void );
50 /* ctor */ CMICmdArgValOptionShort( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd );
51 /* ctor */ CMICmdArgValOptionShort( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd, const ArgValType_e veType, const MIuint vnExpectingNOptions );
53 bool IsArgShortOption( const CMIUtilString & vrTxt ) const;
57 // From CMICmdArgValBase
58 /* dtor */ virtual ~CMICmdArgValOptionShort( void );
62 // From CMICmdArgValOptionLong
63 virtual bool IsArgOptionCorrect( const CMIUtilString & vrTxt ) const;
64 virtual bool ArgNameMatch( const CMIUtilString & vrTxt ) const;