MCPcopy Create free account
hub / github.com/apache/arrow / ListAddItem

Method ListAddItem

cpp/src/arrow/flight/sql/odbc/odbc_impl/ui/window.cc:217–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void Window::ListAddItem(const std::vector<std::wstring>& items) {
218 LVITEM lvi = {0};
219 lvi.mask = LVIF_TEXT;
220 lvi.pszText = const_cast<wchar_t*>(items[0].c_str());
221
222 int ret = ListView_InsertItem(handle_, &lvi);
223 if (ret < 0) {
224 std::stringstream buf;
225 buf << "Can not add list item, error code: " << GetLastError();
226 throw DriverException(buf.str());
227 }
228
229 for (size_t i = 1; i < items.size(); ++i) {
230 ListView_SetItemText(handle_, ret, static_cast<int>(i),
231 const_cast<wchar_t*>(items[i].c_str()));
232 }
233}
234
235void Window::ListDeleteSelectedItem() {
236 const int row_index = ListView_GetSelectionMark(handle_);

Callers 2

CreatePropertiesGroupMethod · 0.80
OnMessageMethod · 0.80

Calls 3

DriverExceptionClass · 0.85
strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected