All pastes #585806 Raw Edit

DavidR

public cpp v1 · immutable
#585806 ·published 2007-06-23 13:45 UTC
rendered paste body
/*! * TuClassCreator *  * Base class - responsible for creating other classes. * A TNEW'd instance is registered into the object factory, and  * the factory simply calls   creator->Create(); to get an object. * "Totally dynamic stuff". * *  1)  TNEW ClassCreatorDerived; *  2)  derived->GiveServerPointer(tu); *  3)  derived->Init() *  4)  derived->Create()   etc. * * $Date: 2007-06-22 20:09:25 +0100 (Fri, 22 Jun 2007) $ * $LastChangedBy: DavidR $ * $Revision: 167 $ * Copyright (c) 2007 by OneManBand Software */#pragma once#include "abstractedobject.h"#include "coreserver.h"class TUONOLIB_API TuClassCreator :	public AbstractedObject{public:    TuClassCreator();	virtual						~TuClassCreator(void);	virtual void				Init();	virtual AbstractedObject*	Create(CONTROL_TYPE t);	// this is needed so class creators in game.dll can access	// tuono directly. 	void			GiveServerPointer(TuCoreServer* tuP);	std::string		GetID()				{ return ID; }	std::string		GetFriendlyName()	{ return FriendlyName; }	std::string		GetFriendlyDescription() { return FriendlyDescription; }	unsigned int	GetServerClassID()	{ return ServerClassID; }	unsigned int	GetClientClassID()	{ return ClientClassID; }protected:	std::string		ID;	std::string		FriendlyName;	std::string		FriendlyDescription;	unsigned int	ServerClassID;	unsigned int	ClientClassID;	TuCoreServer*	tu;};