`eventpp/eventmaker.h` contains several macros to generate event classes.
Without the macros, we may need to repeat the same code structure on lots of event classes.
For example,
```c++
// The base event
class Event
{
};
class EventMouseDown : public Event
{
public:
int getX() const;
int getY() const;
int getButton() const;
private:
int x;
int y;
int button;
};
class EventKeyDown : public Event
{
public:
int getKey() const;
private:
int key;
};
```
It's not rare that there are dozens of or even hundreds of event classes in a system, and we need to repeat the same code structure many times, which is boring and error prone.
The macros in eventmaker.h can reduce the work significantly.
**baseClassName**: the class name that the event inherits from. The macro requires a base class. If the class name contains comma (,), such as a template class, it should be enclosed within parenthesis. Examples, `Event`, `(AnotherEvent<int, char>)`.
**baseClassArgs**: the arguments passed to the base class. If the arguments contain comma (,), it should be enclosed within parenthesis. If there is no arguments for the base class, `()` can be used.
**The variadic arguments (...)**: the tuples of member data type and getter/setter function name. A tuple is elements in a pair of parenthesis. A tuple can contain 2 or 3 elements, the first element is the data type, the second element is the getter function name, and the optional third element is the setter function name. Some tuples examples: `(int, getX)`, `(std::string, getText, setText)`.
Note: the variadic arguments can't be empty. If the even class doesn't have data member, use `EVENTPP_MAKE_EMPTY_EVENT` instead.
The macro always generates a default constructor and a constructor that takes all data members and initialize them.