| Line | |
|---|
| 1 | // ============================================================ // |
|---|
| 2 | // // |
|---|
| 3 | // File : items.cxx // |
|---|
| 4 | // Purpose : // |
|---|
| 5 | // // |
|---|
| 6 | // Coded by Ralf Westram (coder@reallysoft.de) in June 2016 // |
|---|
| 7 | // http://www.arb-home.de/ // |
|---|
| 8 | // // |
|---|
| 9 | // ============================================================ // |
|---|
| 10 | |
|---|
| 11 | #include "items.h" |
|---|
| 12 | #include <arbdb.h> |
|---|
| 13 | |
|---|
| 14 | GBDATA *MutableBoundItemSel::get_any_item() const { |
|---|
| 15 | /*! get any item of this type |
|---|
| 16 | * @return NULp of no item exists. Otherwise the "first item" is returned. |
|---|
| 17 | */ |
|---|
| 18 | GB_transaction ta(gb_main); |
|---|
| 19 | |
|---|
| 20 | GBDATA *gb_container = selector.get_first_item_container(gb_main, NULp, QUERY_ALL_ITEMS); |
|---|
| 21 | while (gb_container) { |
|---|
| 22 | GBDATA *gb_item = selector.get_first_item(gb_container, QUERY_ALL_ITEMS); |
|---|
| 23 | if (gb_item) return gb_item; |
|---|
| 24 | |
|---|
| 25 | gb_container = selector.get_next_item_container(gb_container, QUERY_ALL_ITEMS); |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | return NULp; |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.