/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* * Main authors: * Guido Tack */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #ifdef _WIN32 #define NOMINMAX // Need this before all (implicit) include's of Windows.h #endif #include #include #include #include #include #ifdef _WIN32 #undef ERROR #endif using namespace std; namespace MiniZinc { MZN_SolverFactory::MZN_SolverFactory(void) { SolverConfig sc("org.minizinc.mzn-mzn", MZN_VERSION_MAJOR "." MZN_VERSION_MINOR "." MZN_VERSION_PATCH); sc.name("Generic MiniZinc driver"); sc.mznlibVersion(1); sc.description("MiniZinc generic MiniZinc solver plugin"); sc.requiredFlags({"-m"}); sc.tags({"__internal__"}); sc.supportsFzn(false); sc.supportsMzn(true); sc.needsSolns2Out(false); SolverConfigs::registerBuiltinSolver(sc); } string MZN_SolverFactory::getDescription(SolverInstanceBase::Options*) { string v = "MZN solver plugin, compiled " __DATE__ " " __TIME__; return v; } string MZN_SolverFactory::getVersion(SolverInstanceBase::Options*) { return MZN_VERSION_MAJOR; } string MZN_SolverFactory::getId() { return "org.minizinc.mzn-mzn"; } void MZN_SolverFactory::printHelp(ostream& os) { os << "MZN-MZN plugin options:" << std::endl << " -m, --minizinc-cmd \n the backend solver filename.\n" << " --mzn-flags , --minizinc-flags \n Specify option to be passed to " "the MiniZinc interpreter.\n" << " --mzn-flag