Android-cuttlefish cvd tool
system_image_dir.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 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
22
23namespace cuttlefish {
24
26 public:
28
29 // Note: While most vectorized arguments are aligned with instance numbers
30 // matching the instance_nums flag (or num_instances in the simple case),
31 // since this is used to derive flag default values for other vectorized
32 // flags, it is accessed directly by index instead.
33 std::string ForIndex(size_t argument_index) const;
34
35 size_t Size() const { return system_image_dirs_.size(); }
36
37 private:
38 explicit SystemImageDirFlag(std::vector<std::string> system_image_dirs);
39
40 std::vector<std::string> system_image_dirs_;
41};
42
43} // namespace cuttlefish
Definition: expected.h:86
Definition: system_image_dir.h:25
std::vector< std::string > system_image_dirs_
Definition: system_image_dir.h:40
SystemImageDirFlag(std::vector< std::string > system_image_dirs)
Definition: system_image_dir.cc:58
std::string ForIndex(size_t argument_index) const
Definition: system_image_dir.cc:51
static Result< SystemImageDirFlag > FromGlobalGflags()
Definition: system_image_dir.cc:33
size_t Size() const
Definition: system_image_dir.h:35
Definition: alloc_utils.cpp:23