Ejemplo n.º 1
0
void build_wx_wildcard_from_io_factory_aux(const std::string& family, const std::string& group, const vector<factory_key>& id, ostringstream& wildcard)
{
    ostringstream oss1;
    ostringstream oss2;
    bool first = true;
    for(vector<factory_key>::const_iterator it = id.begin(); it!=id.end(); ++it)
    {
        if(family!="" && it->family != family) continue;
        if(group !="" && it->group  != group ) continue;
        if(!first)
        {
            oss1 << " ";
            oss2 << ";";
        }
        string current_ext = it->extension;
        oss1 << current_ext;
        oss2 << "*." << current_ext << ";";
        to_upper(current_ext);
        oss2 << "*." << current_ext;
        first = false;
    }
    if(!first)
    {
        if(wildcard.tellp()>0) wildcard << "|";
        wildcard << (family==""?(group==""?"Supported":group):family) << " files (" << oss1.str() << ")|" << oss2.str();
    }
}