Lines Matching refs:item
208 Item item; in AddDisplayFunction() local
209 item.name = name; in AddDisplayFunction()
210 item.width = name.size(); in AddDisplayFunction()
211 item.func = func; in AddDisplayFunction()
212 item.func_with_info = nullptr; in AddDisplayFunction()
213 display_v_.push_back(item); in AddDisplayFunction()
218 Item item; in AddDisplayFunction() local
219 item.name = name; in AddDisplayFunction()
220 item.width = name.size(); in AddDisplayFunction()
221 item.func = nullptr; in AddDisplayFunction()
222 item.func_with_info = func_with_info; in AddDisplayFunction()
223 display_v_.push_back(item); in AddDisplayFunction()
234 for (auto& item : display_v_) { in AdjustWidth()
235 std::string data = (item.func != nullptr) in AdjustWidth()
236 ? item.func(sample) in AdjustWidth()
237 : item.func_with_info(sample, info_); in AdjustWidth()
238 item.width = std::max(item.width, data.size()); in AdjustWidth()
244 auto& item = display_v_[i]; in PrintNames() local
246 fprintf(fp, "%s%c", item.name.c_str(), (i + 1 == display_v_.size()) ? '\n' : ','); in PrintNames()
249 fprintf(fp, "%-*s ", static_cast<int>(item.width), item.name.c_str()); in PrintNames()
251 fprintf(fp, "%s\n", item.name.c_str()); in PrintNames()
259 auto& item = display_v_[i]; in PrintSample() local
260 std::string data = (item.func != nullptr) in PrintSample()
261 ? item.func(sample) in PrintSample()
262 : item.func_with_info(sample, info_); in PrintSample()
272 fprintf(fp, "%-*s ", static_cast<int>(item.width), data.c_str()); in PrintSample()