Advertisement
Guest User

employee.h

a guest
May 20th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.92 KB | None | 0 0
  1. /*-
  2.  * Copyright (c) 2012 valsorym <valsorym.e@gmail.com>.
  3.  * All rights reserved.
  4.  *
  5.  * Discussion on the forums.freebsd.org.
  6.  *  url: http://forums.freebsd.org/showthread.php?p=177208
  7.  */
  8.  
  9. /*
  10.  * Very simple class, for example OOD in ANSI C.
  11.  */
  12.  
  13. /* NEW TYPES */
  14. /* ************************************************************************* */
  15.  
  16. #ifndef EMPLOYEE_H
  17. #define EMPLOYEE_H
  18.  
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21. #include <string.h>
  22.  
  23. #include "human.h"
  24.  
  25. /* Сlass of persons. */
  26. struct w_employee {
  27.     /* Private: */
  28.     struct w_human *human;
  29.     char *post;
  30.    
  31.     /* Public: */
  32.     char *(*setpost)(struct w_employee *, char *);
  33.     char *(*getpost)(struct w_employee *);
  34. };
  35.  
  36. /* Class initializer. */
  37. extern const struct w_employee_initializer {
  38.     struct w_employee *(*create)(int , char *, char *);
  39.     void (*destroy)(struct w_employee *);
  40. } w_employee;
  41.  
  42. #endif
  43.  
  44. /* The End. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement