//--------------------------------------------------------------------------------------
//	File	:	AVP_ServerNode_FormationPoint.h
//	Author	:	Gareth Thomas
//	Created	:	18 / 12 / 2007
//	Copyright (C) 2006 Rebellion, All Rights Reserved.
//--------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------
// BEGIN FILE WRAPPER
#ifdef ASURA_USE_PRAGMA_ONCE 
#pragma once
#endif
#ifndef __AVP_SERVERNODE_FORMATIONPOINT_H__
#define __AVP_SERVERNODE_FORMATIONPOINT_H__ 1
// END FILE WRAPPER
//--------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------
//	INCLUDES
//--------------------------------------------------------------------------------------
#include "Entity/Locations/Asura_ServerEntity_Node.h"

//--------------------------------------------------------------------------------------
//	Class	:	AVP_ServerNode_FormationPoint
//	Created	:	18 / 12 / 07
//	Author	:	Gareth Thomas
//--------------------------------------------------------------------------------------
class AVP_ServerNode_FormationPoint : public Asura_ServerEntity_Node
{

public:

	// Public Overridden functions...
	virtual void						WriteToChunkStream		(Asura_Chunk_Stream& xStream) const;
	virtual void						ReadFromChunkStream		(Asura_Chunk_Stream& xStream);
	virtual bool 						CanBeSavedToChunk		(void) const							{return(true);}
	virtual bool						IsFilledFromChunkBuffer	(void) const							{return(false);}
	virtual bool						HasClientEntities		(void) const							{return (false);}
	virtual void						PostLoadInitialise		(void);

	// Public Static Functions...
	static AVP_ServerNode_FormationPoint*								Create(const Asura_Guid uGuid);
	static AVP_ServerNode_FormationPoint*								FindEntity(Asura_Guid uGuid)			{return s_xList.FindEntity(uGuid);}
	static const Asura_Hashed_List<AVP_ServerNode_FormationPoint>*		GetList(void)							{return &s_xList;}

#ifdef ASURA_TOOLS
	virtual void ApplyChangesForTemplateInstance(class Tools_EntityTemplateInstance* pxInstance);
	virtual bool CanBeIncludedInTemplate() const { return true; }
#endif

protected:

	// Construction / Destruction
	AVP_ServerNode_FormationPoint(const Asura_Guid uGuid);
	virtual ~AVP_ServerNode_FormationPoint(void);

private:

	// Friend classes
	friend class ToolsAVP_Node_FormationPoint;

	// Private typedefs
	typedef Asura_ServerEntity_Node PARENT;

	// Chunk Version
	enum { CURRENT_CHUNK_VERSION = 0 };

	// Private statics
	static Asura_Hashed_List<AVP_ServerNode_FormationPoint> s_xList;
};

#endif   // __AVP_SERVERNODE_FORMATIONPOINT_H__
