class.h.tpl 446 B

123456789101112131415161718192021
  1. {{ range .Imports}}
  2. #include {{.}}
  3. {{ end }}
  4. {{range .Tables}}class {{Mapper .Name}} {
  5. {{$table := .}}
  6. public:
  7. {{range .Columns}}{{$name := Mapper .Name}} {{Type .}} Get{{Mapper .Name}}() {
  8. return this->m_{{UnTitle $name}};
  9. }
  10. void Set{{$name}}({{Type .}} {{UnTitle $name}}) {
  11. this->m_{{UnTitle $name}} = {{UnTitle $name}};
  12. }
  13. {{end}}private:
  14. {{range .Columns}}{{$name := Mapper .Name}} {{Type .}} m_{{UnTitle $name}};
  15. {{end}}
  16. }
  17. {{end}}