Files
src-1.2/engine/server/library/serverGame/src/shared/objectTemplate/ServerConstructionContractObjectTemplate.h
T
2014-01-15 03:59:18 -07:00

84 lines
2.4 KiB
C++

//========================================================================
//
// ServerConstructionContractObjectTemplate.h
//
//IMPORTANT: Any code between //@BEGIN TFD... and //@END TFD... will be
//overwritten the next time the template definition is compiled. Do not
//make changes to code inside these blocks.
//
// copyright 2001 Sony Online Entertainment
//
//========================================================================
#ifndef _INCLUDED_ServerConstructionContractObjectTemplate_H
#define _INCLUDED_ServerConstructionContractObjectTemplate_H
#include "ServerIntangibleObjectTemplate.h"
#include "sharedFoundation/DynamicVariable.h"
#include "sharedUtility/TemplateParameter.h"
class Vector;
typedef StructParam<ObjectTemplate> StructParamOT;
//@BEGIN TFD TEMPLATE REFS
//@END TFD TEMPLATE REFS
class ServerConstructionContractObjectTemplate : public ServerIntangibleObjectTemplate
{
public:
//@BEGIN TFD ID
enum
{
ServerConstructionContractObjectTemplate_tag = TAG(C,O,N,C)
};
//@END TFD ID
public:
ServerConstructionContractObjectTemplate(const std::string & filename);
virtual ~ServerConstructionContractObjectTemplate();
virtual Tag getId(void) const;
virtual Tag getTemplateVersion(void) const;
virtual Tag getHighestTemplateVersion(void) const;
static void install(bool allowDefaultTemplateParams = true);
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
private:
//@END TFD
private:
Tag m_templateVersion; // the template version
bool m_versionOk; // flag that the template version loaded is the one we expect
static bool ms_allowDefaultTemplateParams; // flag to allow defaut params instead of fataling
static void registerMe(void);
static ObjectTemplate * create(const std::string & filename);
// no copying
ServerConstructionContractObjectTemplate(const ServerConstructionContractObjectTemplate &);
ServerConstructionContractObjectTemplate & operator =(const ServerConstructionContractObjectTemplate &);
};
inline void ServerConstructionContractObjectTemplate::install(bool allowDefaultTemplateParams)
{
ms_allowDefaultTemplateParams = allowDefaultTemplateParams;
//@BEGIN TFD INSTALL
ServerConstructionContractObjectTemplate::registerMe();
//@END TFD INSTALL
}
#endif // _INCLUDED_ServerConstructionContractObjectTemplate_H