// ------------------------------------------------------------------------------------------------ // Helper function to build a list of all file extensions supported by ASSIMP void Importer::GetExtensionList(aiString& szOut) const { ASSIMP_BEGIN_EXCEPTION_REGION(); std::set<std::string> str; for (std::vector<BaseImporter*>::const_iterator i = pimpl->mImporter.begin();i != pimpl->mImporter.end();++i) { (*i)->GetExtensionList(str); } for (std::set<std::string>::const_iterator it = str.begin();; ) { szOut.Append("*."); szOut.Append((*it).c_str()); if (++it == str.end()) { break; } szOut.Append(";"); } ASSIMP_END_EXCEPTION_REGION(void); }
// ----------------------------------------------------------------------------------- // Convert a name to standard XML format void ConvertName(aiString& out, const aiString& in) { out.length = 0; for (unsigned int i = 0; i < in.length; ++i) { switch (in.data[i]) { case '<': out.Append("<");break; case '>': out.Append(">");break; case '&': out.Append("&");break; case '\"': out.Append(""");break; case '\'': out.Append("'");break; default: out.data[out.length++] = in.data[i]; } } out.data[out.length] = 0; }