#include "stdafx.h" #include "IdentifyArea.h" std::string get_str_by_identify_group(int omr_out_type, IdentifyGroup*ptr_group,char option_spacer) { std::string ret = ""; if (ptr_group&&ptr_group->select){ for (int i = 0; i < ptr_group->item_count; ++i){ int *ptr_int = ptr_group->select + i; auto ptr_tmp = ptr_group->get_item_by_index(i); if (*ptr_int == 1 && ptr_tmp){ ret += ptr_tmp->name; if (omr_out_type == 0) break; ret += option_spacer; } } } if (!ret.empty() && ret[ret.size() - 1] == ',') ret = std::string(ret, 0, ret.size() - 1); return ret; }