Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "PropertyManager.hpp"
- namespace GQE
- {
- PropertyManager::PropertyManager()
- {
- }
- PropertyManager::~PropertyManager()
- {
- std::map<const std::string, IProperty*>::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 std::string, IProperty*>::const_iterator anProptertyIter;
- for(anProptertyIter = thePropertyManager.mList.begin();
- anProptertyIter != thePropertyManager.mList.end();
- ++anProptertyIter)
- {
- IProperty* anProperty = (anProptertyIter->second);
- Add(anProperty->MakeClone());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment