//////////////////////////////////////////////////////////////////////////////
//
// AVP_ServerEntity_Lift.h
//
// Copyright (c) 2006 Rebellion. All rights reserved.
//
// Description:
//
//     Project override of asura lift class
//
//////////////////////////////////////////////////////////////////////////////

// B E G I N   F I L E   W R A P P E R ///////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef ___AVP_SERVERENTITY_LIFT_H___
#define ___AVP_SERVERENTITY_LIFT_H___ 1

// I N C L U D E S ///////////////////////////////////////////////////////////

// Engine independent.
#include "Entity/PhysicalObject/Asura_ServerEntity_Lift.h"

// Project independent.
#include "Entity/PhysicalObject/AVP_ServerEntity_PhysicalObject.h"

// C L A S S E S /////////////////////////////////////////////////////////////

class AVP_ServerEntity_Lift : public AVP_ServerEntity_PhysicalObject, public virtual Asura_ServerEntity_Lift
{

public:

	static AVP_ServerEntity_Lift* Create( const Asura_Guid uGuid ) { return(new AVP_ServerEntity_Lift (uGuid)); }

    static AVP_ServerEntity_Lift* FindEntity( Asura_Guid uGUID ) { return s_xList.FindEntity( uGUID ); }
    static const Asura_Hashed_List<AVP_ServerEntity_Lift>* GetList( void ) { return &s_xList; }    

    virtual bool HandleMessage(const Asura_Message* pxMessage);
    virtual void Update( void );
	virtual void InitialiseFromChunkBuffer( const char*& pcChunkBfr );
	virtual void ReadFromChunkStream( Asura_Chunk_Stream& xStream );
    virtual void WriteToChunkStream( Asura_Chunk_Stream& xStream ) const;
        
#ifdef ASURA_TOOLS
	static void CreateFromTools(Asura_Guid uGuid)	{ new AVP_ServerEntity_Lift (uGuid); }

    virtual void ApplyChangesForTemplateInstance( Tools_EntityTemplateInstance* pxInstance );
    virtual bool CanBeIncludedInTemplate( void ) const;

#endif // #ifdef ASURA_TOOLS

protected:
    AVP_ServerEntity_Lift( const Asura_Guid uGUID = ASURA_GUID_UNREGISTERED);
    virtual ~AVP_ServerEntity_Lift( void );

    virtual void MakeClientUpdateMessage( void );

private:

    typedef AVP_ServerEntity_PhysicalObject PARENT;
    typedef Asura_ServerEntity_Lift PARENT_ASURA;

#ifdef ASURA_TOOLS
    friend class ToolsAVP_Entity_Lift;
#endif

    struct ChunkData
    {
        enum { CURRENT_VERSION = 0 };
    };

    static Asura_Hashed_List<AVP_ServerEntity_Lift> s_xList;
};

// E N D   F I L E   W R A P P E R ///////////////////////////////////////////

#endif // #ifndef ___AVP_SERVERENTITY_LIFT_H___
