chromium/base/version.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/version.h"

#include <stddef.h>

#include <algorithm>
#include <ostream>
#include <string_view>

#include "base/check_op.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"

namespace base {

namespace {

// Parses the |numbers| vector representing the different numbers
// inside the version string and constructs a vector of valid integers. It stops
// when it reaches an invalid item (including the wildcard character). |parsed|
// is the resulting integer vector. Function returns true if all numbers were
// parsed successfully, false otherwise.
bool ParseVersionNumbers(std::string_view version_str,
                         std::vector<uint32_t>* parsed) {}

// Compares version components in |components1| with components in
// |components2|. Returns -1, 0 or 1 if |components1| is less than, equal to,
// or greater than |components2|, respectively.
int CompareVersionComponents(const std::vector<uint32_t>& components1,
                             const std::vector<uint32_t>& components2) {}

}  // namespace

Version::Version() = default;

Version::Version(const Version& other) = default;

Version::Version(Version&& other) = default;

Version::~Version() = default;

Version::Version(std::string_view version_str) {}

Version::Version(std::vector<uint32_t> components)
    :{}

bool Version::IsValid() const {}

// static
bool Version::IsValidWildcardString(std::string_view wildcard_string) {}

int Version::CompareToWildcardString(std::string_view wildcard_string) const {}

int Version::CompareTo(const Version& other) const {}

std::string Version::GetString() const {}

bool operator==(const Version& v1, const Version& v2) {}

bool operator!=(const Version& v1, const Version& v2) {}

bool operator<(const Version& v1, const Version& v2) {}

bool operator<=(const Version& v1, const Version& v2) {}

bool operator>(const Version& v1, const Version& v2) {}

bool operator>=(const Version& v1, const Version& v2) {}

std::ostream& operator<<(std::ostream& stream, const Version& v) {}

}  // namespace base