//////////////////////////////////////////////////////////////////////////////
//
// ToolsAVP_Entity_LocationMarker.h
//
// Created by AJK 25/02/2009
//
// Copyright (c) 2009 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef TOOLSAVP_ENTITY_LOCATIONMARKER
#define TOOLSAVP_ENTITY_LOCATIONMARKER

#include "Entity/Tools_Entity_Object.h"

class AVP_ServerEntity_LocationMarker;

class ToolsAVP_Entity_LocationMarker : public Tools_Entity_Object
{
	typedef Tools_Entity_Object PARENT;

public:
	static Tools_Object*						                    Create( Asura_Entity* pxEntity );
	static const Asura_Hashed_List<ToolsAVP_Entity_LocationMarker>* GetList (void) { return(&s_xList); }
	static ToolsAVP_Entity_LocationMarker*                          FindEntity(Asura_Guid uGuid){ return s_xList.FindEntity(uGuid); }

	virtual const char* GetTypeDescription() { return "Objective location marker"; }
	virtual const char* GetName()            { return "Objective location marker"; }
	virtual void UpdatePositionInAsuraData( bool bUpdateLinkedObjects );
	virtual void Update();
	virtual void Destroy();
	virtual void OnSelection();

	void	                         SetLocationMarker ( AVP_ServerEntity_LocationMarker* pxMarker ) { m_pxMarker = pxMarker; }
	AVP_ServerEntity_LocationMarker* GetLocationMarker () { return m_pxMarker; }

protected:
	ToolsAVP_Entity_LocationMarker ( Asura_Entity* pxEntity );
	ToolsAVP_Entity_LocationMarker ( const ToolsAVP_Entity_LocationMarker& xRhs );
	virtual ~ToolsAVP_Entity_LocationMarker();

private:
	void RemoveMeFromPlayerObjectiveList() const;

	AVP_ServerEntity_LocationMarker* m_pxMarker;

	static ToolsAVP_Entity_LocationMarker*	s_pxThis;
	static Asura_Hashed_List<ToolsAVP_Entity_LocationMarker> s_xList;
};
#endif