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 <vector>
20
21#include "absl/strings/string_view.h"
22
24
25namespace cuttlefish {
26
27// This is very similar to gflags::CommandLineFlagInfo, but excludes
28// has_validator_fn, is_default and flag_ptr as those only make sense for flags
29// defined in the current process and are not in the XML.
31 std::string file;
32 std::string name;
33 std::string meaning;
34 std::string default_value;
35 std::string current_value;
36 std::string type;
37
38 bool operator==(const GflagDescription&) const = default;
39};
41 absl::string_view xml_help);
42
43} // namespace cuttlefish
Definition: alloc_driver.h:21
Result< std::vector< GflagDescription > > ParseGflagsXmlHelp(absl::string_view xml_help)
Definition: gflags_xml_parser.cpp:29
tl::expected< T, StackTraceError< E > > Result
Definition: result_type.h:30
Definition: gflags_xml_parser.h:30
std::string current_value
Definition: gflags_xml_parser.h:35
bool operator==(const GflagDescription &) const =default
std::string type
Definition: gflags_xml_parser.h:36
std::string name
Definition: gflags_xml_parser.h:32
std::string default_value
Definition: gflags_xml_parser.h:34
std::string meaning
Definition: gflags_xml_parser.h:33
std::string file
Definition: gflags_xml_parser.h:31