home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / overview / dtscpluslibrary / documents / dtscplus library use < prev    next >
Encoding:
Text File  |  2000-06-23  |  2.5 KB  |  48 lines

  1.  
  2. DTSCPlus LIBRARY USE   
  3. Kent Sandvik/DTS
  4.  
  5.  
  6. INTRODUCTION
  7. This kit contains a set of utility classes that could be used with any C++ related projects (MacApp, Bedrock, private libraries).  Feel free to copy these, modify them, rewrite them, tune them, reimplement them, or do anything interesting with the code.
  8.  
  9. The core idea was that programmers want to tweak classes, and that’s fine. There’s no big framework, just loose classes that could be used wherever. More like components than classes tied to a huge architecture. This is the reason I created those collection classes as well, to be independent of any framework.
  10.  
  11.  
  12. STATE OF THE CODE
  13. Well, it’s sort of alpha-beta, many of the classes have been tested inside-out, however the classes have not been fully tested with various projects, so be careful.
  14.  
  15.  
  16. HOW TO USE THESE CLASSES
  17. Look at the test source files, eg. UserTerminationTest.cp, for insight into how to use the classes.
  18.  
  19.  
  20. PERFORMANCE ISSUES
  21. These classes were originally designed for Shared Library Manager use. This is the reason all member functions are virtual. It is also easier to make something for SLM, and if something is overhead, feel free to tweak it.
  22.  
  23. You might want to change any of the light-weight member functions into inline code, copy the code from the .cp file into the .h file.
  24.  
  25. SYNTACTICAL ISSUES
  26. The code conforms to MPW C++ coding (Miss Manners) standards. It is formatted using CDent (available on the developer CD).
  27.  
  28. Other interesting issues, why the use of goto:s, man? Well, the new style of class design is to have a defined entry and exit point -- for the sake of later debugging. So sometimes it makes sense to jump to a common exit point. Maybe goto:s will have a come-back?
  29.  
  30. The iterator should all look the same, and behave the same way. That’s an important aspect when designing classes. All destructors are virtual. If you won’t use SLM, and you want to avoid vtables, get rid of the virtual statements.
  31.  
  32.  
  33. DEBUGGING
  34. The classes use assertion macros quite a lot in order to catch sudden toolbox bugs, you might revise the way this is handled. In general each member function should return a Boolean if the execution went OK or not. In future exception handling will be perfect for this situation.
  35.  
  36.  
  37. WHAT’s THAT MINI-FRAMEWORK?
  38. It’s an embryo to make a small simple C++ shell for quick prototyping.  This shell might evolve in future to contain full AppleScripting support.
  39.  
  40.  
  41.  
  42. ANY OTHER QUESTIONS
  43. Well, the question is the answer. Long term plans might be to wire together such SLM  C++ components using AppleScripting as the glue.
  44.  
  45. Kent Sandvik
  46.  
  47.  
  48.