]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValThreadGrp.h
MFV r288408:
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdArgValThreadGrp.h
1 //===-- MICmdArgValThreadGrp.h ----------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 //++
11 // File:        MICmdArgValThreadGrp.h
12 //
13 // Overview:    CMICmdArgValThreadGrp interface.
14 //
15 // Environment: Compilers:  Visual C++ 12.
16 //                          gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 //              Libraries:  See MIReadmetxt.
18 //
19 // Copyright:   None.
20 //--
21
22 #pragma once
23
24 // In-house headers:
25 #include "MICmdArgValBase.h"
26
27 // Declarations:
28 class CMICmdArgContext;
29
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.
38 // Gotchas: None.
39 // Authors: Illya Rudkin 15/04/2014.
40 // Changes: None.
41 //--
42 class CMICmdArgValThreadGrp : public CMICmdArgValBaseTemplate<MIuint>
43 {
44     // Methods:
45   public:
46     /* ctor */ CMICmdArgValThreadGrp(void);
47     /* ctor */ CMICmdArgValThreadGrp(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd);
48     //
49     bool IsArgThreadGrp(const CMIUtilString &vrTxt) const;
50
51     // Overridden:
52   public:
53     // From CMICmdArgValBase
54     /* dtor */ virtual ~CMICmdArgValThreadGrp(void);
55     // From CMICmdArgSet::IArg
56     virtual bool Validate(CMICmdArgContext &vArgContext);
57
58     // Methods:
59   private:
60     bool ExtractNumber(const CMIUtilString &vrTxt);
61     MIuint GetNumber(void) const;
62
63     // Attributes:
64   private:
65     MIuint m_nThreadGrp;
66 };