]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValFile.h
Upgrade our copy of clang and llvm to 3.5.1 release. This is a bugfix
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdArgValFile.h
1 //===-- MICmdArgValFile.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:                MICmdArgValFile.h
12 //
13 // Overview:    CMICmdArgValFile 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 .
36 //                      Based on the Interpreter pattern.
37 // Gotchas:     None.
38 // Authors:     Illya Rudkin 15/04/2014.
39 // Changes:     None.
40 //--
41 class CMICmdArgValFile : public CMICmdArgValBaseTemplate< CMIUtilString >
42 {
43 // Methods:
44 public:
45         /* ctor */      CMICmdArgValFile( void );
46         /* ctor */      CMICmdArgValFile( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd );
47         //
48         bool                    IsFilePath( const CMIUtilString & vrFileNamePath ) const;
49         CMIUtilString   GetFileNamePath( const CMIUtilString & vrTxt ) const;
50
51 // Overridden:
52 public:
53         // From CMICmdArgValBase
54         /* dtor */ virtual ~CMICmdArgValFile( void );
55         // From CMICmdArgSet::IArg
56         virtual bool    Validate( CMICmdArgContext & vwArgContext );
57
58 // Methods:
59 private:
60         bool    IsValidChars( const CMIUtilString & vrText ) const;
61 };