00001
#include "stdafx.h"
00002
#include "Entity.h"
00003
00004 CEntity::CEntity()
00005 {
00006 m_strName =
"";
00007 m_uiID = 0;
00008 }
00009
00010 CEntity::~CEntity()
00011 {
00012 m_strName.Empty();
00013 }
00014
00015 void CEntity::SetName(CString& strName)
00016 {
00017 m_strName = strName;
00018 }
00019
00020 CString&
CEntity::GetName()
00021 {
00022
return m_strName;
00023 }
00024
00025 void CEntity::SetID(UINT uiID)
00026 {
00027 m_uiID = uiID;
00028 }
00029
00030 UINT
CEntity::GetID()
00031 {
00032
return m_uiID;
00033 }
00034
00035 void CEntity::SetEntityType(eEntityType eType)
00036 {
00037 m_EntityType = eType;
00038 }
00039
00040 eEntityType
CEntity::GetEntityType()
00041 {
00042
return m_EntityType;
00043 }
00044
00045 bool CEntity::IsOfType(eEntityType eType)
00046 {
00047
if(eType == Entity_Default)
00048
return true;
00049
00050
return false;
00051 }
00052
00053 bool CEntity::PropertyChanging(
const void* pvProperty ,
void* pvNewValue )
00054 {
00055
if(pvProperty == &m_strName)
00056 m_strName = *(CString *)pvNewValue;
00057
00058
return true;
00059 }
00060
00061 void CEntity::GetProperties( EPropList& PropList )
00062 {
00063 PropList.AddTab(
"Properties");
00064 PropList.AddPropSeparator(
this,
"Entity");
00065 PropList.AddPropString(
this,
"Name", &m_strName,
true)->SetComment(
"Entity' name");
00066 PropList.AddPropInt(
this,
"ID", &m_uiID,
"",
false)->SetComment(
"Auto assigned Unique Identifier");
00067 }