Made class name getter, can not be set outside of class
This commit is contained in:
10
Instance.cpp
10
Instance.cpp
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user