1 //===-- MICmdArgValFile.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: MICmdArgValFile.h
13 // Overview: CMICmdArgValFile 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 .
36 // Based on the Interpreter pattern.
38 // Authors: Illya Rudkin 15/04/2014.
41 class CMICmdArgValFile : public CMICmdArgValBaseTemplate<CMIUtilString>
45 /* ctor */ CMICmdArgValFile(void);
46 /* ctor */ CMICmdArgValFile(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd);
48 bool IsFilePath(const CMIUtilString &vrFileNamePath) const;
49 CMIUtilString GetFileNamePath(const CMIUtilString &vrTxt) const;
53 // From CMICmdArgValBase
54 /* dtor */ virtual ~CMICmdArgValFile(void);
55 // From CMICmdArgSet::IArg
56 virtual bool Validate(CMICmdArgContext &vwArgContext);
60 bool IsValidChars(const CMIUtilString &vrText) const;