forked from stepcode/stepcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentityDescriptorList.h
More file actions
73 lines (54 loc) · 1.71 KB
/
entityDescriptorList.h
File metadata and controls
73 lines (54 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef ENTITYDESCRIPTORLIST_H
#define ENTITYDESCRIPTORLIST_H
///header for list, node, and iterator
#include "SingleLinkList.h"
#include "sc_export.h"
class EntityDescriptor;
class SC_CORE_EXPORT EntityDescLinkNode : public SingleLinkNode {
private:
protected:
EntityDescriptor * _entityDesc;
public:
EntityDescLinkNode();
virtual ~EntityDescLinkNode();
EntityDescriptor * EntityDesc() const {
return _entityDesc;
}
void EntityDesc( EntityDescriptor * ed ) {
_entityDesc = ed;
}
};
class SC_CORE_EXPORT EntityDescriptorList : public SingleLinkList {
private:
protected:
public:
EntityDescriptorList();
virtual ~EntityDescriptorList();
virtual SingleLinkNode * NewNode() {
return new EntityDescLinkNode;
}
EntityDescLinkNode * AddNode( EntityDescriptor * ed ) {
EntityDescLinkNode * node = ( EntityDescLinkNode * ) NewNode();
node->EntityDesc( ed );
SingleLinkList::AppendNode( node );
return node;
}
};
typedef EntityDescriptorList * Entity__set_ptr;
typedef Entity__set_ptr Entity__set_var;
class SC_CORE_EXPORT EntityDescItr {
protected:
const EntityDescriptorList & edl;
const EntityDescLinkNode * cur;
public:
EntityDescItr( const EntityDescriptorList & edList );
virtual ~EntityDescItr();
void ResetItr() {
cur = ( EntityDescLinkNode * )( edl.GetHead() );
}
inline const EntityDescriptor * NextEntityDesc() {
return NextEntityDesc_nc();
}
EntityDescriptor * NextEntityDesc_nc();
};
#endif //ENTITYDESCRIPTORLIST_H