Android-cuttlefish cvd tool
gflags_xml_parser.h
Go to the documentation of this file.
1//
2// Copyright (C) 2026 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <string>
19#include <string_view>
20#include <vector>
21
23
24namespace cuttlefish {
25
26// This is very similar to gflags::CommandLineFlagInfo, but excludes
27// has_validator_fn, is_default and flag_ptr as those only make sense for flags
28// defined in the current process and are not in the XML.
30 std::string file;
31 std::string name;
32 std::string meaning;
33 std::string default_value;
34 std::string current_value;
35 std::string type;
36
37 bool operator==(const GflagDescription&) const = default;
38};
40 std::string_view xml_help);
41
42} // namespace cuttlefish
Definition: alloc_driver.h:20
tl::expected< T, StackTraceError > Result
Definition: result_type.h:30
Result< std::vector< GflagDescription > > ParseGflagsXmlHelp(std::string_view xml_help)
Definition: gflags_xml_parser.cpp:29
Definition: gflags_xml_parser.h:29
std::string current_value
Definition: gflags_xml_parser.h:34
bool operator==(const GflagDescription &) const =default
std::string type
Definition: gflags_xml_parser.h:35
std::string name
Definition: gflags_xml_parser.h:31
std::string default_value
Definition: gflags_xml_parser.h:33
std::string meaning
Definition: gflags_xml_parser.h:32
std::string file
Definition: gflags_xml_parser.h:30