#include "PropertyManager.hpp" namespace GQE { PropertyManager::PropertyManager() { } PropertyManager::~PropertyManager() { std::map::iterator anProptertyIter; for(anProptertyIter = mList.begin(); anProptertyIter != mList.end(); ++anProptertyIter) { IProperty* anProperty = (anProptertyIter->second); delete anProperty; anProperty = NULL; } } bool PropertyManager::HasID(const std::string thePropertyID) { bool anResult = false; anResult = (mList.find(thePropertyID) != mList.end()); return anResult; } void PropertyManager::Add(IProperty* theProperty) { if(mList.find(theProperty->GetID()) == mList.end()) { mList[theProperty->GetID()] = theProperty; } } void PropertyManager::Clone(const PropertyManager& thePropertyManager) { std::map::const_iterator anProptertyIter; for(anProptertyIter = thePropertyManager.mList.begin(); anProptertyIter != thePropertyManager.mList.end(); ++anProptertyIter) { IProperty* anProperty = (anProptertyIter->second); Add(anProperty->MakeClone()); } } }