Created EntityFile which loads an EntityXMLFile into a temporary world to be merged with another world when you want to create a copy of the entity loaded from disk. This allows us to free EntityXMLFile once it's loaded into an EntityFile.

This commit is contained in:
2016-03-02 19:52:11 +01:00
parent 44b4a597d4
commit 069583e09f
3 changed files with 46 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifndef EntityFile_h__
#define EntityFile_h__
#include "World.h"
#include "EntityXMLFile.h"
#include "EntityXMLFilePreprocessor.h"
#include "EntityXMLFileParser.h"
#include "EntityWrapper.h"
class EntityFile : private World, public Resource
{
public:
EntityFile(std::string path);
EntityWrapper MergeInto(World* other);
private:
EntityID m_RootEntity = EntityID_Invalid;
};
#endif