Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

employee.h

By: a guest on May 20th, 2012  |  syntax: C  |  size: 0.92 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. */