1 |
#include "ObjectElement.h"
|
2 |
#include "../System/SystemDefine.h"
|
3 |
#include "DefineObjects.h"
|
4 |
|
5 |
ObjectElement::ObjectElement(void *iPointer, int iTypeOfObject, char *iName)
|
6 |
{
|
7 |
pointer=iPointer;
|
8 |
typeOfObject=iTypeOfObject;
|
9 |
name = new String(iName);
|
10 |
}
|
11 |
|
12 |
ObjectElement::~ObjectElement()
|
13 |
{
|
14 |
remove();
|
15 |
delete name;
|
16 |
}
|
17 |
|
18 |
void ObjectElement::remove()
|
19 |
{
|
20 |
if (typeOfObject == DefineExtPropertiesElement)
|
21 |
{
|
22 |
ExtPropertiesElement *extPropertiesElement=(ExtPropertiesElement*)pointer;
|
23 |
delete extPropertiesElement;
|
24 |
}
|
25 |
|
26 |
if (typeOfObject == DefineSGI)
|
27 |
{
|
28 |
SGI *sgi=(SGI*)pointer;
|
29 |
delete sgi;
|
30 |
}
|
31 |
|
32 |
if (typeOfObject == DefineTMapareData)
|
33 |
{
|
34 |
TMapareData *tMapareData=(TMapareData*)pointer;
|
35 |
delete tMapareData;
|
36 |
}
|
37 |
} |