Files
IfcOpenShell/src/ifcgeom/ConversionSettings.cpp
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
906 B
C++
Raw Normal View History

2023-03-21 20:15:01 +01:00
#include "ConversionSettings.h"
2023-11-15 10:32:20 +01:00
/*
2023-03-21 20:15:01 +01:00
void ifcopenshell::geometry::ConversionSettings::setValue(GeomValue var, double value) {
values_[var] = value;
}
double ifcopenshell::geometry::ConversionSettings::getValue(GeomValue var) const {
return values_[var];
}
2023-11-15 10:32:20 +01:00
*/
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;
}