16d528ed9Sopenharmony_ci// Copyright (c) 2013 The Chromium Authors. All rights reserved. 26d528ed9Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 36d528ed9Sopenharmony_ci// found in the LICENSE file. 46d528ed9Sopenharmony_ci 56d528ed9Sopenharmony_ci#ifndef TOOLS_GN_INPUT_CONVERSION_H_ 66d528ed9Sopenharmony_ci#define TOOLS_GN_INPUT_CONVERSION_H_ 76d528ed9Sopenharmony_ci 86d528ed9Sopenharmony_ci#include <string> 96d528ed9Sopenharmony_ci 106d528ed9Sopenharmony_ciclass Err; 116d528ed9Sopenharmony_ciclass ParseNode; 126d528ed9Sopenharmony_ciclass Settings; 136d528ed9Sopenharmony_ciclass Value; 146d528ed9Sopenharmony_ci 156d528ed9Sopenharmony_ciextern const char kInputOutputConversion_Help[]; 166d528ed9Sopenharmony_ci 176d528ed9Sopenharmony_ci// Converts the given input string (is read from a file or output from a 186d528ed9Sopenharmony_ci// script) to a Value. Conversions as specified in the input_conversion string 196d528ed9Sopenharmony_ci// will be performed. The given origin will be used for constructing the 206d528ed9Sopenharmony_ci// resulting Value. 216d528ed9Sopenharmony_ci// 226d528ed9Sopenharmony_ci// If the conversion string is invalid, the error will be set and an empty 236d528ed9Sopenharmony_ci// value will be returned. 246d528ed9Sopenharmony_ciValue ConvertInputToValue(const Settings* settings, 256d528ed9Sopenharmony_ci const std::string& input, 266d528ed9Sopenharmony_ci const ParseNode* origin, 276d528ed9Sopenharmony_ci const Value& input_conversion_value, 286d528ed9Sopenharmony_ci Err* err); 296d528ed9Sopenharmony_ci 306d528ed9Sopenharmony_ci#endif // TOOLS_GN_INPUT_CONVERSION_H_ 31