home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -seriously_amiga- / programming / c / asap / rdargs.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.  * ARDArgs wrapper class                                                     *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_ARDArgs_H
  12. #define ASAP_ARDArgs_H
  13.  
  14. #include <New.h>
  15.  
  16. extern "C"
  17. {
  18.  #include <Proto/DOS.h>
  19. }
  20.  
  21. class ARDArgs : public RDArgs
  22. {
  23.  public:
  24.  inline void FreeArgs();
  25.  inline void operator delete(void *);
  26.  inline static ARDArgs * ReadArgs(STRPTR arg_template, LONG * array, RDArgs * args = NULL);
  27.  inline void * operator new(size_t, STRPTR arg_template, LONG * array, RDArgs * args = NULL);
  28. };
  29. //----------------------------------------------------------------------------
  30. void ARDArgs::FreeArgs ()
  31. {
  32.  ::FreeArgs(this);
  33. }
  34. //----------------------------------------------------------------------------
  35. void ARDArgs::operator delete(void *rdargs)
  36. {
  37.  ((ARDArgs *) rdargs)->FreeArgs();
  38. }
  39. //----------------------------------------------------------------------------
  40. ARDArgs * ARDArgs::ReadArgs (STRPTR arg_template, LONG * array, RDArgs * args)
  41. {
  42.  return (ARDArgs *) ::ReadArgs(arg_template, array, args);
  43. }
  44. //----------------------------------------------------------------------------
  45. void * ARDArgs::operator new(size_t, STRPTR arg_template, LONG * array, RDArgs * args)
  46. {
  47.  return ARDArgs::ReadArgs(arg_template, array, args);
  48. }
  49.  
  50. #endif
  51.