Changeset 62
- Timestamp:
- 01/04/2008 05:32:34 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/nrEngine/PropertyManager.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/nrEngine/PropertyManager.cpp
r49 r62 47 47 Property& PropertyManager::getProperty(const std::string& name, const std::string& group) 48 48 { 49 return mPropertyMap[group][name]; 49 // get list which should contain the property 50 PropertyList& list = mPropertyMap[group]; 51 52 // check if such a property exists in the database 53 PropertyList::iterator it = list.begin(); 54 for (; it != list.end(); it++) 55 if (it->getName() == name) return *it; 56 57 // we haven't found this property hence generate new one 58 Property p; 59 p.mName = name; 60 p.mFullname = group + std::string(".") + name; 61 62 // some debug info 63 NR_Log(Log::LOG_ENGINE, Log::LL_DEBUG, "Property: Initialize new property '%s.%s'", group.c_str(), name.c_str()); 64 65 // add property into the list and return the reference 66 list.push_back(p); 67 return list.back(); 50 68 } 51 69 … … 68 86 // we have not found any such element, so create one 69 87 NR_Log(Log::LOG_ENGINE, Log::LL_WARNING, "PropertyManager: Property with fullname '%s' is not registered, so create it in default group", fullname.c_str()); 70 return getProperty(fullname, " ");88 return getProperty(fullname, "."); 71 89 } 72 90
Note: See TracChangeset
for help on using the changeset viewer.
