#ifndef PORYGONLANG_USERDATACOLLECTIONITERATOR_HPP
#define PORYGONLANG_USERDATACOLLECTIONITERATOR_HPP

#include "../../Evaluator/Iterator/Iterator.hpp"

namespace Porygon::UserData{
    class UserDataCollectionIterator : public Evaluation::Iterator{
        const Evaluation::EvalValue* (*_getCurrent)();
        const Evaluation::EvalValue* (*_moveNext)();
        const Evaluation::EvalValue* (*_reset)();
    public:
        UserDataCollectionIterator(const Evaluation::EvalValue* (*getCurrent)(),
                                   const Evaluation::EvalValue* (*moveNext)(),
                                   const Evaluation::EvalValue* (*reset)()){
            _getCurrent = getCurrent;
            _moveNext = moveNext;
            _reset = reset;
        }

        const Evaluation::EvalValue* GetCurrent() final{
            return _getCurrent();
        }
        bool MoveNext() final{
            return _moveNext();
        }
        void Reset() final{
            _reset();
        }
    };
}


#endif //PORYGONLANG_USERDATACOLLECTIONITERATOR_HPP
