home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / PTR-TCL v2.1 / Support / New TCL Source / oops.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-09  |  576 b   |  32 lines  |  [TEXT/MMCC]

  1. /*
  2.  * oops.h
  3.  * © 1994 Jon Wätte
  4.  */
  5.  
  6. #pragma once
  7.  
  8. #ifndef __OOPS__
  9. # define __OOPS__
  10.  
  11. #define DECLARE_PUBLIC(sub,sup) \
  12. CObject * new_ ## sub ( void ) ; \
  13. class sub : public sup { \
  14.     public : sub(); private :
  15.  
  16. #define DECLARE_PRIVATE(sub,sup) \
  17. CObject * new_ ## sub ( void ) ; \
  18. class sub : private sup { \
  19.     public : sub(); private :
  20.  
  21. #define CLASS class
  22.  
  23. #define member(obj,cls) ((obj)->MemberOf(#cls))
  24.  
  25. class CObject ;
  26. extern CObject * _new_by_name ( char * name ) ;
  27. #define new_by_name(name) _new_by_name(name)
  28.  
  29. #define class_name(x) ((x)->_clsName)
  30.  
  31. #endif // __OOPS__
  32.