//----------------------------------------------------------------------------
// wxHelpControllerBase
// (automatically generated)
//----------------------------------------------------------------------------
#include "stdafx.h"

Gura_BeginModule(wx)

//----------------------------------------------------------------------------
// Class derivation
//----------------------------------------------------------------------------
class wx_HelpControllerBase: public wxHelpControllerBase, public GuraObjectObserver {
private:
	Gura::Signal _sig;
	Object_wx_HelpControllerBase *_pObj;
public:
	~wx_HelpControllerBase();
	inline void AssocWithGura(Gura::Signal &sig, Object_wx_HelpControllerBase *pObj) {
		_sig = sig, _pObj = pObj;
	}
	// virtual function of GuraObjectObserver
	virtual void GuraObjectDeleted();
};

wx_HelpControllerBase::~wx_HelpControllerBase()
{
	if (_pObj != NULL) _pObj->InvalidateEntity();
}

void wx_HelpControllerBase::GuraObjectDeleted()
{
	_pObj = NULL;
}

//----------------------------------------------------------------------------
// Gura interfaces for wxHelpControllerBase
//----------------------------------------------------------------------------

//----------------------------------------------------------------------------
// Object implementation for wxHelpControllerBase
//----------------------------------------------------------------------------
Object_wx_HelpControllerBase::~Object_wx_HelpControllerBase()
{
	if (_pEntity != NULL) NotifyGuraObjectDeleted();
	if (_ownerFlag) delete _pEntity;
	_pEntity = NULL;
}

Object *Object_wx_HelpControllerBase::Clone() const
{
	return NULL;
}

String Object_wx_HelpControllerBase::ToString(Signal sig, bool exprFlag)
{
	String rtn("<wx.HelpControllerBase:");
	if (GetEntity() == NULL) {
		rtn += "invalid>";
	} else {
		char buff[64];
		::sprintf(buff, "%p>", GetEntity());
		rtn += buff;
	}
	return rtn;
}

void Object_wx_HelpControllerBase::OnModuleEntry(Environment &env, Signal sig)
{
}

//----------------------------------------------------------------------------
// Class implementation for wxHelpControllerBase
//----------------------------------------------------------------------------
Gura_ImplementUserInheritableClass(wx_HelpControllerBase)
{
}

Gura_ImplementDescendantCreator(wx_HelpControllerBase)
{
	return new Object_wx_HelpControllerBase((pClass == NULL)? this : pClass, NULL, NULL, OwnerFalse);
}

}}
