add scripts and templates to generate class

TODO: use idl?
gdi: keep code format the same as template's