#include "UserDataCollectionValue.hpp"

namespace Porygon::UserData{
extern "C" {
UserDataCollectionType* CreateCollectionType(const ScriptType* keyType, const ScriptType* valueType){
    return UserDataCollectionType::CreateIndexable(keyType, valueType);
}
UserDataCollectionValue* CreateCollectionValue(UserDataCollectionType* type, void* obj,
                                               const EvalValue* (*get)(void*, const EvalValue*),
                                               void (*set)(void*, const EvalValue*, const EvalValue*),
                                               Iterator* (*getIterator)(void*)){
    return new UserDataCollectionValue(type, new UserDataCollectionHelper(obj, get, set, getIterator));
}
}
}
