Lines Matching refs:Item
187 struct Item {
198 Item item;
199 item.name = name;
200 item.width = name.size();
201 item.func = func;
202 item.func_with_info = nullptr;
203 display_v_.push_back(item);
208 Item item;
209 item.name = name;
210 item.width = name.size();
211 item.func = nullptr;
212 item.func_with_info = func_with_info;
213 display_v_.push_back(item);
221 for (auto& item : display_v_) {
222 std::string data = (item.func != nullptr)
223 ? item.func(sample)
224 : item.func_with_info(sample, info_);
225 item.width = std::max(item.width, data.size());
231 auto& item = display_v_[i];
233 fprintf(fp, "%-*s ", static_cast<int>(item.width), item.name.c_str());
235 fprintf(fp, "%s\n", item.name.c_str());
242 auto& item = display_v_[i];
243 std::string data = (item.func != nullptr)
244 ? item.func(sample)
245 : item.func_with_info(sample, info_);
247 fprintf(fp, "%-*s ", static_cast<int>(item.width), data.c_str());
259 std::vector<Item> display_v_;