home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / hpp.z / DTCODEBK.HPP < prev    next >
C/C++ Source or Header  |  1996-11-08  |  2KB  |  61 lines

  1. #ifndef _DTCODEBK_HPP
  2. #define _DTCODEBK_HPP
  3.  
  4. #if defined( _DEBUG ) && defined( new )
  5. #   undef new
  6. #   undef delete
  7. #   define _REDEFINE_WNEW
  8. #endif
  9.  
  10. #include <wcvector.h>
  11.  
  12. #ifdef _REDEFINE_WNEW
  13. #   include "wnew.hpp"
  14. #endif
  15.  
  16. #include "mtdef.hpp"
  17.  
  18. class MMEvent;
  19. class WStringList;
  20. class SaveSource;
  21. class SaveBlock;
  22. class DTObject;
  23.  
  24. class METACLASSDEF DTCodeBlockBase {
  25.     public:
  26.         inline virtual ~DTCodeBlockBase() = 0;
  27.  
  28.         virtual void   AddDbgLine( int sourceLine ) = 0;
  29.  
  30.         virtual WString         GetName() const = 0;
  31.         virtual const MMEvent * GetEventDef() const = 0;
  32.         virtual int operator == ( const DTCodeBlockBase & ) const = 0;
  33.         virtual int operator <  ( const DTCodeBlockBase & ) const = 0;
  34.     
  35.         virtual void GenPrototype( WStringList & src,
  36.                                     const WString & obj_name ) = 0;
  37.         virtual void GenMembers( WStringList & src ) = 0;
  38.         virtual void GenRTCode( WStringList & src,
  39.                                     const WString & pfx,
  40.                                     const WString & name ) = 0;
  41.         virtual void    GetEventFuncName( WString &name ) = 0;
  42.  
  43.         virtual DTObject *      GetDTObj() = 0;
  44.  
  45.         virtual WBool EditEvent( WBool visible = TRUE ) = 0;
  46.         virtual WBool HasCode() const = 0;
  47.         virtual void  SetEventOwner( DTObject * owner ) = 0;
  48.  
  49.         virtual WBool Save( SaveSource & save ) = 0;
  50.         virtual WBool Load( SaveBlock * load ) = 0;
  51. };
  52.  
  53. inline DTCodeBlockBase::~DTCodeBlockBase() {}
  54.  
  55. //typedef WCPtrSortedVector< DTCodeBlockBase > DTCodeBlockList;
  56. class  DTCodeBlockList :  public WCPtrSortedVector< DTCodeBlockBase > {};
  57.  
  58. class  DTCodeBlockListList :  public WCPtrOrderedVector< DTCodeBlockList > {};
  59.  
  60. #endif // _DTCODEBK_HPP
  61.