home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
DTCODEBK.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-12-14
|
2KB
|
72 lines
#ifndef _DTCODEBK_HPP
#define _DTCODEBK_HPP
#if defined( _DEBUG ) && defined( new )
# undef new
# undef delete
# define _REDEFINE_WNEW
#endif
#include <wcvector.h>
#ifdef _REDEFINE_WNEW
# include "wnew.hpp"
#endif
#include "mtdef.hpp"
class MMEvent;
class WStringList;
class SaveSource;
class SaveBlock;
class DTObject;
class ostream;
class METACLASSDEF DTCodeBlockBase {
public:
inline virtual ~DTCodeBlockBase() = 0;
virtual void AddDbgLine( int sourceLine ) = 0;
virtual WString GetName() const = 0;
virtual const MMEvent * GetEventDef() const = 0;
virtual int operator == ( const DTCodeBlockBase & ) const = 0;
virtual int operator < ( const DTCodeBlockBase & ) const = 0;
virtual void GenPrototype( WStringList & src,
const WString & obj_name ) = 0;
virtual void GenMembers( WStringList & src ) = 0;
virtual void GenRTCode( WStringList & src,
const WString & pfx,
const WString & name ) = 0;
virtual void GetEventFuncName( WString &name ) = 0;
virtual DTObject * GetDTObj() = 0;
virtual WBool EditEvent( WBool visible = TRUE ) = 0;
virtual WBool HasCode() const = 0;
virtual void SetEventOwner( DTObject * owner ) = 0;
virtual WBool Save( SaveSource & save ) = 0;
virtual WBool Load( SaveBlock * load ) = 0;
//
// New style code generation:
// Prototype -- "WBool cb_1_Click( WObject *, WEventData * );"
// EventHandler -- { WClickEvent, WEventHandlerCast(...) },
// Members -- the .cpp definition
virtual void GeneratePrototype( ostream &, const WString & obj ) = 0;
virtual void GenerateEventHandler( ostream &, const WString & obj ) = 0;
virtual void GenerateMembers( ostream & ) = 0;
};
inline DTCodeBlockBase::~DTCodeBlockBase() {}
//typedef WCPtrSortedVector< DTCodeBlockBase > DTCodeBlockList;
class DTCodeBlockList : public WCPtrSortedVector< DTCodeBlockBase > {};
class DTCodeBlockListList : public WCPtrOrderedVector< DTCodeBlockList > {};
#endif // _DTCODEBK_HPP