CmGameObjectHandle.cpp 506 B

12345678910111213141516171819202122
  1. #include "CmPrerequisites.h"
  2. #include "CmGameObject.h"
  3. #include "CmGameObjectHandle.h"
  4. #include "CmException.h"
  5. namespace CamelotFramework
  6. {
  7. GameObjectHandleBase::GameObjectHandleBase(std::shared_ptr<GameObjectHandleData> data)
  8. :mData(data)
  9. { }
  10. GameObjectHandleBase::GameObjectHandleBase()
  11. { }
  12. void GameObjectHandleBase::throwIfDestroyed() const
  13. {
  14. if(isDestroyed())
  15. {
  16. CM_EXCEPT(InternalErrorException, "Trying to access an object that has been destroyed.");
  17. }
  18. }
  19. }