chromium/third_party/abseil-cpp/absl/flags/marshalling.cc

//
//  Copyright 2019 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "absl/flags/marshalling.h"

#include <stddef.h>

#include <cmath>
#include <limits>
#include <sstream>
#include <string>
#include <type_traits>
#include <vector>

#include "absl/base/config.h"
#include "absl/base/log_severity.h"
#include "absl/base/macros.h"
#include "absl/numeric/int128.h"
#include "absl/strings/ascii.h"
#include "absl/strings/match.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"

namespace absl {
ABSL_NAMESPACE_BEGIN
namespace flags_internal {

// --------------------------------------------------------------------
// AbslParseFlag specializations for boolean type.

bool AbslParseFlag(absl::string_view text, bool* dst, std::string*) {}

// --------------------------------------------------------------------
// AbslParseFlag for integral types.

// Return the base to use for parsing text as an integer.  Leading 0x
// puts us in base 16.  But leading 0 does not put us in base 8. It
// caused too many bugs when we had that behavior.
static int NumericBase(absl::string_view text) {}

template <typename IntType>
inline bool ParseFlagImpl(absl::string_view text, IntType& dst) {}

bool AbslParseFlag(absl::string_view text, short* dst, std::string*) {}

bool AbslParseFlag(absl::string_view text, unsigned short* dst, std::string*) {}

bool AbslParseFlag(absl::string_view text, int* dst, std::string*) {}

bool AbslParseFlag(absl::string_view text, unsigned int* dst, std::string*) {}

bool AbslParseFlag(absl::string_view text, long* dst, std::string*) {}

bool AbslParseFlag(absl::string_view text, unsigned long* dst, std::string*) {}

bool AbslParseFlag(absl::string_view text, long long* dst, std::string*) {}

bool AbslParseFlag(absl::string_view text, unsigned long long* dst,
                   std::string*) {}

bool AbslParseFlag(absl::string_view text, absl::int128* dst, std::string*) {}

bool AbslParseFlag(absl::string_view text, absl::uint128* dst, std::string*) {}

// --------------------------------------------------------------------
// AbslParseFlag for floating point types.

bool AbslParseFlag(absl::string_view text, float* dst, std::string*) {}

bool AbslParseFlag(absl::string_view text, double* dst, std::string*) {}

// --------------------------------------------------------------------
// AbslParseFlag for strings.

bool AbslParseFlag(absl::string_view text, std::string* dst, std::string*) {}

// --------------------------------------------------------------------
// AbslParseFlag for vector of strings.

bool AbslParseFlag(absl::string_view text, std::vector<std::string>* dst,
                   std::string*) {}

// --------------------------------------------------------------------
// AbslUnparseFlag specializations for various builtin flag types.

std::string Unparse(bool v) {}
std::string Unparse(short v) {}
std::string Unparse(unsigned short v) {}
std::string Unparse(int v) {}
std::string Unparse(unsigned int v) {}
std::string Unparse(long v) {}
std::string Unparse(unsigned long v) {}
std::string Unparse(long long v) {}
std::string Unparse(unsigned long long v) {}
std::string Unparse(absl::int128 v) {}
std::string Unparse(absl::uint128 v) {}

template <typename T>
std::string UnparseFloatingPointVal(T v) {}
std::string Unparse(float v) {}
std::string Unparse(double v) {}
std::string AbslUnparseFlag(absl::string_view v) {}
std::string AbslUnparseFlag(const std::vector<std::string>& v) {}

}  // namespace flags_internal

bool AbslParseFlag(absl::string_view text, absl::LogSeverity* dst,
                   std::string* err) {}

std::string AbslUnparseFlag(absl::LogSeverity v) {}

ABSL_NAMESPACE_END
}  // namespace absl