Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 24, 2009, 2:47:53 AM (15 years ago)
Author:
landauf
Message:

Removed the Factory class.
Moved the networkID↔Identifier map from Factory to Identifier.
Replaced the name↔Identifier map from Factory with the already existing Identifier map in Identifier. This map additionally contains Identifiers without Factory. You can separate them with the new function identifier→hasFactory().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/core/ConfigFileManager.cc

    r5738 r5778  
    4848    bool config(const std::string& classname, const std::string& varname, const std::string& value)
    4949    {
    50         std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseIdentifierMap().find(getLowercase(classname));
    51         if (identifier != Identifier::getLowercaseIdentifierMapEnd())
     50        std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname));
     51        if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
    5252        {
    5353            std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
     
    6060    bool tconfig(const std::string& classname, const std::string& varname, const std::string& value)
    6161    {
    62         std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseIdentifierMap().find(getLowercase(classname));
    63         if (identifier != Identifier::getLowercaseIdentifierMapEnd())
     62        std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname));
     63        if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
    6464        {
    6565            std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
     
    376376        for (std::list<ConfigFileSection*>::iterator it1 = this->sections_.begin(); it1 != this->sections_.end(); )
    377377        {
    378             std::map<std::string, Identifier*>::const_iterator it2 = Identifier::getIdentifierMap().find((*it1)->getName());
    379             if (it2 != Identifier::getIdentifierMapEnd() && (*it2).second->hasConfigValues())
     378            std::map<std::string, Identifier*>::const_iterator it2 = Identifier::getStringIdentifierMap().find((*it1)->getName());
     379            if (it2 != Identifier::getStringIdentifierMapEnd() && (*it2).second->hasConfigValues())
    380380            {
    381381                // The section exists, delete comment
     
    455455        if (this->type_ == ConfigFileType::Settings)
    456456        {
    457             for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getIdentifierMapBegin(); it != Identifier::getIdentifierMapEnd(); ++it)
     457            for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMapBegin(); it != Identifier::getStringIdentifierMapEnd(); ++it)
    458458            {
    459459                if (it->second->hasConfigValues())
Note: See TracChangeset for help on using the changeset viewer.