/* -*- 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 #include #include #include #include #include #include #ifdef _WIN32 #undef ERROR #endif using namespace std; namespace MiniZinc { FZN_SolverFactory::FZN_SolverFactory(void) { SolverConfig sc("org.minizinc.mzn-fzn", MZN_VERSION_MAJOR "." MZN_VERSION_MINOR "." MZN_VERSION_PATCH); sc.name("Generic FlatZinc driver"); sc.mznlibVersion(1); sc.description("MiniZinc generic FlatZinc solver plugin"); sc.requiredFlags({"--fzn-cmd"}); sc.stdFlags({"-a", "-n", "-f", "-p", "-s", "-r", "-v"}); sc.tags({"__internal__"}); SolverConfigs::registerBuiltinSolver(sc); } string FZN_SolverFactory::getDescription(SolverInstanceBase::Options*) { string v = "FZN solver plugin, compiled " __DATE__ " " __TIME__; return v; } string FZN_SolverFactory::getVersion(SolverInstanceBase::Options*) { return MZN_VERSION_MAJOR; } string FZN_SolverFactory::getId() { return "org.minizinc.mzn-fzn"; } void FZN_SolverFactory::printHelp(ostream& os) { os << "MZN-FZN plugin options:" << std::endl << " --fzn-cmd , --flatzinc-cmd \n the backend solver filename.\n" << " -b, --backend, --solver-backend \n the backend codename. Currently passed to " "the solver.\n" << " --fzn-flags , --flatzinc-flags \n Specify option to be passed to " "the FlatZinc interpreter.\n" << " --fzn-flag