I have one class:
template <class EventType = SFAEvent>
class SFAEventDispatcher {
SFALinkedList<SFACallback<EventType> > callbacks[size];
void dispatch(EventType &e) {
...
SFALinkedList<SFACallback<EventType> >::iterator iter = callbacks[e.type].begin;
...
};
}
I'm using a LinkedList with iterator defined as:
template <typename Type>
class SFALinkedList {
public:
typedef SFALinkedListIterator<SFASinglyElement<Type> > iterator;
}
The problem is:
If I use:
SFALinkedList<SFACallback<EventType> >::iterator iter;
EventType defined in template, don't work, but if I use:
SFALinkedList<SFACallback<SFAEvent> >::iterator;
SFAEvent being a class, work;
Example of my Linked List:
SFALinkedList<float> list;
list.append(1.1);
list.append(2.2);
list.append(3.3);
list.append(4.4);
for(SFALinkedList<float>::iterator inter = list.begin(); inter.hasNext(); inter.next()) {
//print inter.current();
}
How can I use EventType defined in template of SFAEventDispatcher class to pass as argument of template for my linked list?