Debian Codegraph @

tools/skslc/ProcessWorklist.h

raw
1 /*
2 * Copyright 2022 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkProcessWorklist_DEFINED
9 #define SkProcessWorklist_DEFINED
10
11 #include "include/core/SkSpan.h"
12
13 #include <functional>
14 #include <string>
15
16 enum class ResultCode {
17 kSuccess = 0,
18 kCompileError = 1,
19 kInputError = 2,
20 kOutputError = 3,
21 kConfigurationError = 4,
22 };
23
24 /**
25 * Processes multiple inputs in a single invocation by reading a worklist file.
26 * The processCommand is invoked with a set of arguments, read from the worklist.
27 * A blank line is used to separate one group of arguments from the next group.
28 */
29 ResultCode ProcessWorklist(
30 const char* worklistPath,
31 const std::function<ResultCode(SkSpan<std::string> args)>& processCommandFn);
32
33 #endif