home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Programming / MR_Classes / Dev / Include / classes / supermodel.h
Encoding:
C/C++ Source or Header  |  2000-08-04  |  1.5 KB  |  40 lines

  1. #ifndef CLASSES_SUPERMODEL_H
  2. #define CLASSES_SUPERMODEL_H
  3.  
  4. #ifndef UTILITY_TAGITEM_H
  5. #include <utility/tagitem.h>
  6. #endif
  7.  
  8. #define SMA_DUMMY(x) ( (TAG_USER | 0x40000000) + (x) )
  9.  
  10. #define SMA_AddMember SMA_DUMMY(1) // If NULL during OM_NEW the whole Model will fail.
  11. #define SMA_RemMember SMA_DUMMY(2)
  12.  
  13. #define SMA_GlueFunc  SMA_DUMMY(3) // 
  14. /*
  15.   ULONG __asm (*GlueFunc)(register __a0 struct  smaGlueData *GD,
  16.                           register __a1 struct  TagItem *TagList, 
  17.                           register __a2 APTR    UserData,
  18.                           register __a6 APTR    A6);
  19. */
  20. #define SMA_GlueFuncA6        SMA_DUMMY(4) // if GlueFunc is a library function, sets A6 to libbase
  21. #define SMA_GlueFuncUserData  SMA_DUMMY(5) // (APTR) Sent to GlueFunc in register a3
  22.  
  23. #define SMA_CacheStringTag SMA_DUMMY (100) // ? (ULONG) TagID of a tag whose value is a string.
  24. //When Model object encounters this tag during Notify, the string is cached and the ti_Data will be changed to the cached string.
  25.  
  26. struct smGlueData
  27. {                            // Don't TOUCH 
  28.   Class   *ModelCL;          // Don't TOUCH
  29.   Object  *ModelObject;      // Don't TOUCH
  30.   struct  opUpdate *Update;  // Don't TOUCH
  31. };
  32.  
  33. #define SMM_PRIVATE0  0x1000 // private
  34.  
  35. #define SICA_Model    SMA_DUMMY(1001)
  36. #define SICA_InMap    SMA_DUMMY(1002) // TagList, given to object, must be allocated with CloneTagItems()
  37. #define SICA_OutMap   SMA_DUMMY(1003) // TagList, given to object, must be allocated with CloneTagItems()
  38.  
  39. #endif /* CLASSES_SUPERMODEL_H */
  40.