Logo Search packages:      
Sourcecode: einstein version File versions  Download package

void Resource::addVariant ( ResourceFile *  file,
int  i18nScore,
const ResourceFile::DirectoryEntry entry 

Add resource variant.

file resource file
i18nScore locale compability score
entry resource entry in global directory

Definition at line 448 of file resources.cpp.

Referenced by ResourcesCollection::processFiles(), and Resource().

    if (! variants.size()) {
        variants.push_back(new ResVariant(file, i18nScore, entry));
    ScorePredicate p(i18nScore);
    Variants::iterator i = std::find_if(variants.begin(), variants.end(), p);
    if (i != variants.end()) {
        delete *i;
        *i = new ResVariant(file, i18nScore, entry);
    } else {
        variants.push_back(new ResVariant(file, i18nScore, entry));
        ResVariantMoreThen comparator;
        std::sort(variants.begin(), variants.end(), comparator);

Generated by  Doxygen 1.6.0   Back to index