/***************************************************************************
*                                                                          *
*  Copyright (C) Golaem S.A.  All Rights Reserved.                         *
*                                                                          *
***************************************************************************/

#pragma once

#include <glmAbstractUserBehavior.h>

#include "glmMemory.h"

namespace glm
{
    class UserCallbackContext;

    class GLM_SDK_API AbstractUserCallbackBehavior : public AbstractUserBehavior
    {
    public:
        GLM_ABSTRACTCLASS_STAT_ID( glm::MemoryStatIds::Simulation)

        AbstractUserCallbackBehavior();
        virtual ~AbstractUserCallbackBehavior();

        virtual void doCallbackComputation(const UserCallbackContext& callbackContext, int64_t index, BehaviorGraph& graph, Time dt) = 0; // for per entity callbacks

        // type checking - value derived from this type
        virtual bool isThisType(const AbstractBehavior* value) const override;

    protected:
        // cloning
        friend class CloneFactory;
        virtual AbstractUserCallbackBehavior* create() const override = 0;

    private:
        GLM_DISALLOW_COPY_AND_ASSIGN(AbstractUserCallbackBehavior);
    };
} // namespace glm
