-
-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathCommandLine.h
More file actions
42 lines (31 loc) · 1.64 KB
/
CommandLine.h
File metadata and controls
42 lines (31 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*==============================================================================
Copyright 2018 by Tracktion Corporation.
For more information visit www.tracktion.com
You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
pluginval IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================*/
#pragma once
#include "juce_core/juce_core.h"
#include "Validator.h"
//==============================================================================
struct CommandLineValidator
{
explicit CommandLineValidator (std::function<void (int)> completionCallback = {});
~CommandLineValidator();
void validate (const juce::String&, PluginTests::Options);
private:
std::unique_ptr<ValidationPass> validator;
std::function<void (int)> completion;
};
//==============================================================================
void performCommandLine (CommandLineValidator&, const juce::String& commandLine);
bool shouldPerformCommandLine (const juce::String& commandLine);
bool shouldPerformCommandLine (int argc, char* argv[]);
int runCommandLineApplication (int argc, char* argv[]);
//==============================================================================
std::pair<juce::String, PluginTests::Options> parseCommandLine (const juce::String&);
std::pair<juce::String, PluginTests::Options> parseCommandLine (const juce::ArgumentList&);
juce::StringArray createCommandLine (juce::String fileOrID, PluginTests::Options);