41 #ifdef CHECK_MEMORY_LEAKS
43 #endif // CHECK_MEMORY_LEAKS
60 return mySelected.count(
id) > 0;
66 mySelected.insert(
id);
88 const std::set<GUIGlID>&
155 throw ProcessError(
"Unkown object in GUISelectedStorage::toggleSelection (id=" +
toString(
id) +
").");
168 const std::set<GUIGlID>&
174 const std::set<GUIGlID>&
182 for (std::map<GUIGlObjectType, SingleTypeSelections>::iterator it =
mySelections.begin(); it !=
mySelections.end(); it++) {
194 std::set<GUIGlID> result;
195 std::ostringstream msg;
196 std::ifstream strm(filename.c_str());
200 msgOut =
"Could not open '" + filename +
"'.\n";
203 while (strm.good()) {
206 if (line.length() == 0) {
214 if (numIgnored + numMissing <= maxErrors) {
215 msg <<
"Ignoring item '" << line <<
"' because of invalid type " <<
toString(object->
getType()) <<
"\n";
218 result.insert(object->
getGlID());
222 if (numIgnored + numMissing <= maxErrors) {
223 msg <<
"Item '" + line +
"' not found\n";
229 if (numIgnored + numMissing > maxErrors) {
230 msg <<
"...\n" << numIgnored <<
" objects ignored, " << numMissing <<
" objects not found\n";
240 const std::set<GUIGlID> ids =
loadIDs(filename, errors, type);
241 for (std::set<GUIGlID>::const_iterator it = ids.begin(); it != ids.end(); it++) {
278 for (std::set<GUIGlID>::const_iterator i = ids.begin(); i != ids.end(); ++i) {