home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / IDIOMS.ZIP / EMPTR.H < prev    next >
C/C++ Source or Header  |  1991-12-04  |  1KB  |  28 lines

  1. /* Copyright (c) 1992 by AT&T Bell Laboratories. */
  2. /* Advanced C++ Programming Styles and Idioms */
  3. /* James O. Coplien */
  4. /* All rights reserved. */
  5.  
  6. //************************************************************//
  7. //                                                            //
  8. //     F I L E :    E M P T R . H                             //
  9. //                                                            //
  10. //         Declarations of C++ compiler data structures       //
  11. //                                                            //
  12. //************************************************************//
  13.  
  14. #define _MPTR_H
  15.  
  16. // These data structures support the C++ virtual function
  17. // mechanism.  vptp is a general function pointer;  it
  18. // is used to address (but not call) member functions.
  19. // vvptp is a pointer to a function returning a pointer
  20. // to a function;  it is used in some setup idioms in the
  21. // cutover empire.  mptr describes an entry in the
  22. // virtual function table;  it can be derived from your
  23. // C++ compilation system's object code.
  24.  
  25. typedef int (*vptp)();
  26. typedef vptp (*vvptp)();
  27. struct mptr {short d; short i; vptp f; };
  28.