#ifndef KSAT_MODEL_2_BSON
#define KSAT_MODEL_2_BSON

#include "util/convert.h"
#include "util/ksatinstance.h"

#include "bsoncxx/array/value.hpp"
#include "bsoncxx/builder/stream/array.hpp"

namespace satlab
{

template<typename = bsoncxx::builder::stream::array, typename = KSATinstance::MODEL>
bsoncxx::builder::stream::array convert(const KSATinstance::MODEL& model)
{
    bsoncxx::builder::stream::array builder;
    
    for(auto& lit : model)
    {
        builder << lit;
    }
    
    return builder;
}

}

#endif // KSAT_MODEL_2_BSON
