A set of benchmarks to compare a new prototype MiniZinc implementation
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
3/*
4 * Main authors:
5 * Guido Tack <guido.tack@monash.edu>
6 */
7
8/* This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
11
12#ifndef __MINIZINC_OPTIONS_HH__
13#define __MINIZINC_OPTIONS_HH__
14
15#include <minizinc/hash.hh>
16
17namespace MiniZinc {
18class Options {
19protected:
20 std::unordered_map<std::string, KeepAlive> _options;
21
22 Expression* getParam(const std::string& name) const;
23
24public:
25 void setIntParam(const std::string& name, KeepAlive e);
26 void setFloatParam(const std::string& name, KeepAlive e);
27 void setBoolParam(const std::string& name, KeepAlive e);
28 void setStringParam(const std::string& name, KeepAlive e);
29 void setIntParam(const std::string& name, long long int e);
30 void setFloatParam(const std::string& name, double e);
31 void setBoolParam(const std::string& name, bool e);
32 void setStringParam(const std::string& name, std::string e);
33 long long int getIntParam(const std::string& name) const;
34 long long int getIntParam(const std::string& name, long long int def) const;
35 double getFloatParam(const std::string& name) const;
36 double getFloatParam(const std::string& name, double def) const;
37 bool getBoolParam(const std::string& name) const;
38 bool getBoolParam(const std::string& name, bool def) const;
39 std::string getStringParam(const std::string& name) const;
40 std::string getStringParam(const std::string& name, std::string def) const;
41 bool hasParam(const std::string& name) const;
42 std::ostream& dump(std::ostream& os);
43};
44} // namespace MiniZinc
45
46#endif