Flutter Engine
The Flutter Engine
impeller
base
version.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "
impeller/base/version.h
"
6
7
#include <sstream>
8
9
namespace
impeller
{
10
11
std::optional<Version>
Version::FromVector
(
const
std::vector<size_t>&
version
) {
12
if
(
version
.size() == 0) {
13
return
Version
{0, 0, 0};
14
}
15
if
(
version
.size() == 1) {
16
return
Version
{
version
[0], 0, 0};
17
}
18
if
(
version
.size() == 2) {
19
return
Version
{
version
[0],
version
[1], 0};
20
}
21
if
(
version
.size() == 3) {
22
return
Version
{
version
[0],
version
[1],
version
[2]};
23
}
24
return
std::nullopt;
25
}
26
27
std::string
Version::ToString
()
const
{
28
std::stringstream
stream
;
29
stream
<<
major_version
<<
"."
<<
minor_version
<<
"."
<<
patch_version
;
30
return
stream
.str();
31
}
32
33
}
// namespace impeller
Version
Version
Definition:
SkColorSpace.cpp:230
version.h
dart_profiler_symbols.stream
stream
Definition:
dart_profiler_symbols.py:81
impeller
Definition:
texture.h:18
mskp_parser.version
version
Definition:
mskp_parser.py:30
impeller::Version::patch_version
size_t patch_version
Definition:
version.h:20
impeller::Version::minor_version
size_t minor_version
Definition:
version.h:19
impeller::Version::FromVector
static std::optional< Version > FromVector(const std::vector< size_t > &version)
impeller::Version::ToString
std::string ToString() const
impeller::Version::major_version
size_t major_version
Definition:
version.h:18
Generated on Sun Jun 23 2024 21:54:59 for Flutter Engine by
1.9.4