| 1 |
bearsoft |
1.1 |
#ifndef __ObjectMatrisElement_H__
|
| 2 |
|
|
#define __ObjectMatrisElement_H__
|
| 3 |
|
|
|
| 4 |
|
|
#include "../String/String.h"
|
| 5 |
|
|
#include "../LinkedList/ObjectLinkedList.h"
|
| 6 |
|
|
|
| 7 |
|
|
template <class ClassName>
|
| 8 |
|
|
|
| 9 |
|
|
class ObjectMatrisElement
|
| 10 |
|
|
{
|
| 11 |
|
|
|
| 12 |
|
|
public:
|
| 13 |
|
|
|
| 14 |
|
|
ObjectMatrisElement(char *iName)
|
| 15 |
|
|
{
|
| 16 |
|
|
classNameElement=new ObjectLinkedList<ClassName>();
|
| 17 |
|
|
name = new String(iName);
|
| 18 |
|
|
}
|
| 19 |
|
|
|
| 20 |
|
|
ObjectMatrisElement(const String &iString)
|
| 21 |
|
|
{
|
| 22 |
|
|
classNameElement=new ObjectLinkedList<ClassName>();
|
| 23 |
|
|
name = new String(iString);
|
| 24 |
|
|
}
|
| 25 |
|
|
|
| 26 |
|
|
~ObjectMatrisElement()
|
| 27 |
|
|
{
|
| 28 |
|
|
remove();
|
| 29 |
|
|
}
|
| 30 |
|
|
|
| 31 |
|
|
void remove()
|
| 32 |
|
|
{
|
| 33 |
|
|
if (classNameElement!=null)
|
| 34 |
|
|
{
|
| 35 |
|
|
delete classNameElement;
|
| 36 |
|
|
}
|
| 37 |
|
|
|
| 38 |
|
|
if (name!=null)
|
| 39 |
|
|
{
|
| 40 |
|
|
delete name;
|
| 41 |
|
|
}
|
| 42 |
|
|
}
|
| 43 |
|
|
|
| 44 |
|
|
String *name;
|
| 45 |
|
|
ObjectLinkedList<ClassName> *classNameElement;
|
| 46 |
|
|
ObjectMatrisElement<ClassName> *next;
|
| 47 |
|
|
ObjectMatrisElement<ClassName> *previos;
|
| 48 |
|
|
|
| 49 |
|
|
};
|
| 50 |
|
|
|
| 51 |
|
|
#endif
|