home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -seriously_amiga- / programming / c / asap / coplist.h < prev    next >
C/C++ Source or Header  |  1998-04-23  |  2KB  |  51 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * ACopList wrapper class                                                    *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_CopList_H
  12. #define ASAP_CopList_H
  13.  
  14. #include <New.h>
  15.  
  16. extern "C"
  17. {
  18.  #include <Proto/Graphics.h>
  19. }
  20.  
  21. class ACopList : public CopList
  22. {
  23.  public:
  24.  inline void FreeCopList();
  25.  inline void operator delete(void *);
  26.  inline static ACopList * UCopperListInit(UCopList *, long n);
  27.  inline void * operator new(size_t, UCopList *, long n);
  28. };
  29. //----------------------------------------------------------------------------
  30. void ACopList::FreeCopList ()
  31. {
  32.  ::FreeCopList(this);
  33. }
  34. //----------------------------------------------------------------------------
  35. void ACopList::operator delete (void *copList)
  36. {
  37.  ((ACopList *) copList)->FreeCopList();
  38. }
  39. //----------------------------------------------------------------------------
  40. ACopList * ACopList::UCopperListInit (UCopList *ucopList, long n)
  41. {
  42.  return (ACopList *) ::UCopperListInit(ucopList, n);
  43. }
  44. //----------------------------------------------------------------------------
  45. void * operator new (size_t, UCopList *ucopList, long n)
  46. {
  47.  return ACopList::UCopperListInit(ucopList, n);
  48. }
  49.  
  50. #endif
  51.