ActionGroup_test.m
上传用户:shenzhenrh
上传日期:2013-05-12
资源大小:2904k
文件大小:1k
源码类别:

信息检索与抽取

开发平台:

Unix_Linux

  1. /*
  2. Name:         ActionGroup_test.m
  3. Description:  ActionGroup subclass implementation
  4. Test suite:   activity
  5. */ 
  6. #import "ActionGroup_test.h"
  7. #import <defobj.h>
  8. @implementation ActionGroup_test_c
  9. #define CLASS_NAME ActionGroup_test_c
  10. PHASE(Creating)
  11. #define MIXIN_CREATE
  12. #include "Holder.m"
  13. PHASE(Using)
  14. #undef MIXIN_CREATE
  15. #include "Holder.m"
  16. - (void)describe: outputCharStream
  17. {
  18.   char description[100];
  19.   sprintf (description, "Randomized:        %dn", 
  20.    getBit (bits, BitRandomized));
  21.   sprintf (description, "Number of objects: %dn", numberOfObjects); 
  22.   [outputCharStream catC: description];
  23. }
  24. - (void)describeForEach: outputCharStream
  25. {
  26.   char buffer[50];
  27.   int i;
  28.   for (i = 0; i < numberOfObjects; i++)
  29.     {
  30.       id obj = *(objects + i);
  31.       if (respondsTo (obj, M(describe:)))
  32. [obj describe: outputCharStream];
  33.       else
  34. {
  35.   _obj_formatIDString (buffer, obj);
  36.   [outputCharStream catC: buffer];
  37. }
  38.     }
  39. }
  40. @end