home *** CD-ROM | disk | FTP | other *** search
/ Windows Graphics Programming / Feng_Yuan_Win32_GDI_DirectX.iso / Samples / include / atom.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-11  |  1.4 KB  |  43 lines

  1. //-----------------------------------------------------------------------------------//
  2. //              Windows Graphics Programming: Win32 GDI and DirectDraw               //
  3. //                             ISBN  0-13-086985-6                                   //
  4. //                                                                                   //
  5. //  Written            by  Yuan, Feng                             www.fengyuan.com   //
  6. //  Copyright (c) 2000 by  Hewlett-Packard Company                www.hp.com         //
  7. //  Published          by  Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com      //
  8. //                                                                                   //
  9. //  FileName   : atom.h                                                                 //
  10. //  Description: KAtomTable class                                                    //
  11. //  Version    : 1.00.000, May 31, 2000                                              //
  12. //-----------------------------------------------------------------------------------//
  13.  
  14. #include "Decoder.h"
  15.  
  16. class KAtomTable : public IAtomTable
  17. {
  18.     typedef enum 
  19.     {
  20.         MAX_BUFFER = 32768,
  21.         MAX_NAMES  =  2048
  22.     };
  23.  
  24.     int       m_bufpos;
  25.     int          m_names;
  26.  
  27.     char         m_buffer[MAX_BUFFER];
  28.     const char * m_name[MAX_NAMES];
  29.  
  30. public:
  31.     
  32.     KAtomTable(void);
  33.  
  34.     virtual ATOM AddAtom(const char * name);
  35.  
  36.     virtual const char * GetAtomName(ATOM atom)
  37.     {
  38.         return m_name[(int)atom];
  39.     }
  40. };
  41.  
  42.  
  43.