atm I have a event class;
class Event
{
public:
Event(int eventId)
:
m_eventId(eventId)
{
}
private:
int m_eventId;
}
When users write events they do it like this:
enum
{
kCustomEvent = 'cste'
}
class CustomEvent
{
CustomEvent()
:
Event(kCustomEvent)
{
}
}
This is an idea I got from using the C4 Engine.. Its efficient to use integers like this, but Its dangerous as events might be called the same using the four letter char.. I could use strings, but hashing and comparing them wouldn't be as efficient..
Any tips on how I could do this?







