Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/cpp/iedriverserver/CommandLineArguments.h
2867 views
1
// Licensed to the Software Freedom Conservancy (SFC) under one
2
// or more contributor license agreements. See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership. The SFC licenses this file
5
// to you under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
17
#ifndef COMMANDLINEARGUMENTS_H_
18
#define COMMANDLINEARGUMENTS_H_
19
20
#include <algorithm>
21
#include <map>
22
#include <string>
23
#include <vector>
24
25
using namespace std;
26
27
class CommandLineArguments {
28
public:
29
CommandLineArguments(int arg_count, _TCHAR* arg_array[]);
30
virtual ~CommandLineArguments(void);
31
32
std::wstring GetValue(std::wstring arg_name,
33
std::wstring default_value);
34
bool is_help_requested(void) const { return this->is_help_requested_; }
35
bool is_version_requested(void) const { return this->is_version_requested_; }
36
37
private:
38
void ParseArguments(int argc, _TCHAR* argv[]);
39
int GetSwitchDelimiterLength(std::wstring arg);
40
41
bool is_help_requested_;
42
bool is_version_requested_;
43
std::map<std::wstring, std::wstring> args_map_;
44
};
45
46
#endif // COMMANDLINEARGUMENTS_H_
47