Made class name getter, can not be set outside of class

This commit is contained in:
andreja6
2018-04-30 21:43:02 -07:00
parent 529821ab9f
commit 9986f2ee5f
3 changed files with 17 additions and 8 deletions

View File

@@ -4,12 +4,13 @@
std::string name;
Instance* parent;
static std::string className = "DataModel";
std::vector<Instance* > children;
static std::string className = "BaseInstance";
Instance::Instance(void)
{
name = "Default Game Instance";
className = "DataModel";
className = "BaseInstance";
}
Instance::~Instance(void)
@@ -17,6 +18,11 @@ Instance::~Instance(void)
name = "Default Game Instance";
}
std::string Instance::getClassName()
{
return className;
}