summaryrefslogtreecommitdiff
path: root/src/teams.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/teams.h')
-rw-r--r--src/teams.h32
1 files changed, 9 insertions, 23 deletions
diff --git a/src/teams.h b/src/teams.h
index 15aad82..c65bad3 100644
--- a/src/teams.h
+++ b/src/teams.h
@@ -6,29 +6,15 @@
# include "common.h"
// Type definition
-CLASS(team);
-
-// base functions
-NEW(team);
-DEL(team);
-
-// field getters
-SETTER(team, name, ref(char));
-SETTER(team, institution, ref(char));
-SETTER(team, member_name, ref(char), int);
-SETTER(team, solved, uint8_t);
-
-// field setters
-GETTER(team, name, ptr(char));
-GETTER(team, institution, ptr(char));
-GETTER(team, member_name, ptr(char), int);
-GETTER(team, solved, uint8_t);
-
-// helper functions
-DEFINE(team, printf, int);
-DEFINE(team, fprintf, int, ptr(FILE));
-DEFINE(team, find_champion, team, ptr(team), unsigned);
-
+CLASS( team, {
+ LIST(team, name, char, [255]);
+ LIST(team, member_name, char, [3][255], int);
+ LIST(team, institution, char, [255]);
+ ATOM(team, solved, uint8_t);
+ FUNC(team, printf, int);
+ FUNC(team, fprintf, int, FILE *);
+ FUNC(team, find_champion, team, ptr(team), size_t);
+});
# include "cobj.h"
#endif /* __TEAMS_H__ */
/* vim: ts=8 */