1 //===-- MICmdArgValThreadGrp.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: MICmdArgValThreadGrp.h
13 // Overview: CMICmdArgValThreadGrp interface.
15 // Environment: Compilers: Visual C++ 12.
16 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 // Libraries: See MIReadmetxt.
25 #include "MICmdArgValBase.h"
28 class CMICmdArgContext;
30 //++ ============================================================================
31 // Details: MI common code class. Command argument class. Arguments object
32 // needing specialization derived from the CMICmdArgValBase class.
33 // An argument knows what type of argument it is and how it is to
34 // interpret the options (context) string to find and validate a matching
35 // argument and so extract a value from it. Thread group looks like
36 // "i1" in the options text.
37 // Based on the Interpreter pattern.
39 // Authors: Illya Rudkin 15/04/2014.
42 class CMICmdArgValThreadGrp : public CMICmdArgValBaseTemplate< MIuint >
46 /* ctor */ CMICmdArgValThreadGrp( void );
47 /* ctor */ CMICmdArgValThreadGrp( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd );
49 bool IsArgThreadGrp( const CMIUtilString & vrTxt ) const;
53 // From CMICmdArgValBase
54 /* dtor */ virtual ~CMICmdArgValThreadGrp( void );
55 // From CMICmdArgSet::IArg
56 virtual bool Validate( CMICmdArgContext & vArgContext );
60 bool ExtractNumber( const CMIUtilString & vrTxt );
61 MIuint GetNumber( void ) const;