54 #include "../Type/BBInputType.hpp"
55 #include "../Util/ArrayOfString.hpp"
56 #include "../Util/Exception.hpp"
57 #include "../Util/utils.hpp"
63 std::string s = sConst;
68 ret = NOMAD::BBInputType::CONTINUOUS;
72 ret = NOMAD::BBInputType::ALL_CONTINUOUS;
76 ret = NOMAD::BBInputType::INTEGER;
80 ret = NOMAD::BBInputType::ALL_INTEGER;
84 ret = NOMAD::BBInputType::BINARY;
88 ret = NOMAD::BBInputType::ALL_BINARY;
92 throw NOMAD::Exception(__FILE__, __LINE__,
"Unrecognized string for NOMAD::BBInputType: " + s);
104 NOMAD::ArrayOfString aos(s);
105 std::size_t arraysize = aos.size();
106 if (arraysize >= 2 && aos[0] ==
"(" && aos[arraysize-1] ==
")")
109 if (s.find(
"*") < std::string::npos)
111 throw NOMAD::Exception(__FILE__, __LINE__,
"Unrecognized string for NOMAD::BBInputType: " + s);
114 aos.erase(arraysize-1);
118 for (
size_t i = 0; i < arraysize; i++)
125 if (s.find(
"*") < std::string::npos)
129 for (
size_t i = 0; i < arraysize; i++)
137 if (arraysize > 0 && bbInputType.size() == 0)
139 throw NOMAD::Exception(__FILE__, __LINE__,
"Unrecognized string for NOMAD::BBInputType: " + s);