home *** CD-ROM | disk | FTP | other *** search
/ Dream 57 / Amiga_Dream_57.iso / Amiga / Programmation / c / Outils / Edition / ASAP.lha / Asap / ASAP.readme
Encoding:
Text File  |  2006-11-30  |  5.1 KB  |  123 lines

  1. Short:    ASAP - Amiga Software Authoring Platform
  2. Uploader: hfx@fox.nstn.ca
  3. Author:   hfx@fox.nstn.ca
  4. Type:     dev/c
  5. Requires: One of Storm or SAS or GNU C++
  6. Version:  1.0b beta
  7. Replaces: dev/c/ASAP.lha
  8.  
  9. Update: June 12th '98:
  10.  
  11.       Sorry for the delay, working :)
  12.  
  13.       Added ObtainGIRPort to the ARastPort class (oops!)
  14.       Also added operator new and delete to ARastPort which
  15.       calls ObtainGIRPort and ReleaseGIRPort.
  16.  
  17.       Made the AFileLock and AFileHandle classes inherit privately
  18.       from the AmigaDOS structures because they are BPTRs, not APTRs.
  19.       I could have overloaded operator -> and * to handle conversion
  20.       between APTR and BPTR, but there is no good reason to do so.
  21.  
  22.       This is still a beta because I'm not sure what to do with
  23.       the files I've named with a trailing underscore.
  24.  
  25.       Thanks to Matt Sergeant for testing ASAP with gcc and instructions
  26.       for compiling the lines demo with gcc.
  27.  
  28.       Now that we know AmigaDOS 4 is going to be a developer release,
  29.       I'll be looking into encapsulating it with ASAP. My initial feeling
  30.       is that ASAP should help insulate you from API changes.
  31.  
  32. What: Zero overhead, inlined C++ wrapper classes for the Amiga API.
  33.       A collection of 90 header files, each having one class which derive
  34.       from the corresponding Amiga system structure, adding no data members,
  35.       only inlined methods which call the corresponding global prototype
  36.       substituting the 'this' pointer for the structure pointer.
  37.  
  38. Why: I'm a C++ programmer, and I think in terms of objects. The Amiga API
  39.      is a "flat" API. It helps me, and I hope many of you, to categorize these
  40.      functions into "classes" or "categories". Many of you may be concerned about
  41.      overhead using these. See below, there is absolutely *no* overhead. There are
  42.      several benefits, including fewer bugs, such as CloseWindow(pNotAWindow); Also,
  43.      if you want to work with a Window, or RastPort, for instance, you needn't worry
  44.      about what include's you need, just:
  45.        
  46.      #include <ASAP/Window.h>
  47.      #include <ASAP/RastPort.h>
  48.  
  49. How: A tool called ClassBuilder which I wrote for this purpose.
  50.  
  51. When: Part time work started in late January.
  52.  
  53. How it works: Firstly, there is no run time overhead when your compiler allows
  54.               inline optimization. In effect, these are a lot of #define's. As far
  55.               as storage is concerned, these classes *are* the Amiga structures.
  56.               You can treat these classes 100% as if they were the Amiga structures,
  57.               because ultimately, they are.
  58.  
  59.               Consider a structure, "Structure". There are some functions
  60.               which operate upon it, for example OpenStructure(Structure *) and
  61.               CloseStructure(Structure *). To simplify this for the beginner and
  62.               those who grow tired of typing, I write the following code:
  63.  
  64.               class AStructure : public Structure
  65.               {
  66.                public:
  67.                void Open() { ::OpenStructure(this); }
  68.                void Close() { ::CloseStructure(this); }
  69.               }; 
  70.  
  71.               Now the instance is tied to its methods, and there is less typing.
  72.               Also, I have overloaded operator new and delete where desirable.
  73.               Now you can create/destroy a window as follows:
  74.  
  75.               AWindow *pThis_Window = new(&The_NewWindow) AWindow;
  76.               delete pThis_Window;
  77.             
  78.               instead of:
  79.  
  80.               struct Window *pThis_Window = OpenWindow(&The_NewWindow); 
  81.               CloseWindow(pThis_Window);
  82.  
  83. Updates: These have all been compiled, but there might be one or two
  84.          logic errors (perhaps in the more obscure classes).
  85.  
  86.          Additional version of the collection with abbreviated names for
  87.          those who do not mind aliases for the Amiga API functions.
  88.  
  89.          eg. pThis_Window->Zip(); // instead of pThis_Window->ZipWindow();
  90.  
  91.          Also, default parameters, where the OS defines special parameter
  92.          values or they are otherwise meaningful, must be added.
  93.          This is coming next.
  94.  
  95. Future:  This collection is fairly comprehensive, but not complete. I'm relying
  96.          on you for feedback. Also, this is just phase I. I've got some nice code
  97.          built on top of this to allow simple, dynamic IDCMP/Boopsi event handling
  98.          (dispatching) which I hope to release some time this summer.
  99.  
  100. Installation:
  101.  
  102.     Decompress the archive wherever you wish.
  103.  
  104.     SAS/C: Move the ASAP classes directory into your
  105.            cxxinclude directory (sc:cxxinclude)
  106.  
  107.     Storm C: Put the ASAP class directory wherever you want,
  108.                  only make certain the directory is in your
  109.                  include path.
  110.  
  111.     The files should be reachable as follows:
  112.     
  113.     #include <ASAP/HeaderName.h>
  114.  
  115. Important:
  116.  
  117. Note that I have wrappers for the wizard.library and msql.library also.
  118. Thanks to Christophe Sollet for the msql.library, and also to everyone
  119. who has written with encouraging comments.
  120.  
  121. Please, please email me if you have any problems or suggestions/complaints.
  122. I want to hear from you! :)
  123.