mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
Drastic settings refactoring
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "ConversionSettings.h"
|
||||
|
||||
/*
|
||||
void ifcopenshell::geometry::ConversionSettings::setValue(GeomValue var, double value) {
|
||||
values_[var] = value;
|
||||
}
|
||||
@@ -7,3 +8,32 @@ void ifcopenshell::geometry::ConversionSettings::setValue(GeomValue var, double
|
||||
double ifcopenshell::geometry::ConversionSettings::getValue(GeomValue var) const {
|
||||
return values_[var];
|
||||
}
|
||||
*/
|
||||
|
||||
std::istream& std::operator>>(istream& in, set<int>& ints) {
|
||||
string tokens;
|
||||
in >> tokens;
|
||||
vector<string> strs;
|
||||
boost::split(strs, tokens, boost::is_any_of(","));
|
||||
for (auto& s : strs) {
|
||||
ints.insert(boost::lexical_cast<int>(s));
|
||||
}
|
||||
return in;
|
||||
}
|
||||
|
||||
std::istream& ifcopenshell::geometry::settings::operator>>(std::istream& in, IteratorOutputOptions& ioo)
|
||||
{
|
||||
std::string token;
|
||||
in >> token;
|
||||
boost::to_upper(token);
|
||||
if (token == "TRIANGULATED") {
|
||||
ioo = TRIANGULATED;
|
||||
} else if (token == "NATIVE") {
|
||||
ioo = NATIVE;
|
||||
} else if (token == "SERIALIZED") {
|
||||
ioo = SERIALIZED;
|
||||
} else {
|
||||
in.setstate(std::ios_base::failbit);
|
||||
}
|
||||
return in;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user