home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume36 / formes / part01 / subjset.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-01  |  1.2 KB  |  56 lines

  1.  
  2. /*
  3.  *  Copyright (C) 1992-1993 Jeffrey Chilton
  4.  *
  5.  *  Permission is granted to anyone to make or distribute copies of
  6.  *  this program, in any medium, provided that the copyright notice
  7.  *  and permission notice are preserved, and that the distributor
  8.  *  grants the recipient permission for further redistribution as
  9.  *  permitted by this notice.
  10.  *  
  11.  *  Author's E-mail address:  172-9221@mcimail.com
  12.  *  
  13.  */
  14.  
  15. /* static char *whatstring = "@(#)subjset.h    2.3 JWC"; */
  16.  
  17. #ifndef SUBJSET_H
  18. #define SUBJSET_H
  19.  
  20. /*
  21.  *  SubjectSet - A collection of Subjects
  22.  */
  23.  
  24. typedef struct SubjectSet SubjectSet;
  25.  
  26. #include "collect.h"
  27. #include "subject.h"
  28.  
  29. struct SubjectSet
  30. {
  31.     Collection *allSubjects;
  32. };
  33.  
  34. #if __STDC__
  35.  
  36. extern SubjectSet *SubjectSet_new();
  37. extern void SubjectSet_addOne(SubjectSet *self, Subject *subj);
  38. extern Subject *SubjectSet_getOneByName(SubjectSet *self, char *name);
  39. extern Subject *SubjectSet_getOneAtRandom(SubjectSet *self);
  40. extern void SubjectSet_destroy(SubjectSet *self);
  41.  
  42. #else
  43.  
  44. extern SubjectSet *SubjectSet_new();
  45. extern void SubjectSet_addOne();
  46. extern Subject *SubjectSet_getOneByName();
  47. extern Subject *SubjectSet_getOneAtRandom();
  48. extern void SubjectSet_destroy();
  49.  
  50. #endif
  51.  
  52. #define SubjectSet_getAll(s) ((s)->allSubjects)
  53.  
  54. #endif
  55.  
  56.