mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Fix previous commit on gcc
This commit is contained in:
@@ -225,7 +225,7 @@ void ColladaSerializer::ColladaExporter::ColladaScene::add(
|
||||
node.addMatrix(matrix_array);
|
||||
COLLADASW::InstanceGeometry instanceGeometry(mSW);
|
||||
instanceGeometry.setUrl ("#" + geom_name);
|
||||
foreach(std::string material_name, material_ids) {
|
||||
BOOST_FOREACH(std::string material_name, material_ids) {
|
||||
/// @todo This is done 6 times in this file, try to perform this once and be done with the material naming for the export.
|
||||
collada_id(material_name);
|
||||
COLLADASW::InstanceMaterial material (material_name, "#" + material_name);
|
||||
@@ -364,7 +364,7 @@ bool ColladaSerializer::ColladaExporter::ColladaMaterials::contains(const IfcGeo
|
||||
|
||||
void ColladaSerializer::ColladaExporter::ColladaMaterials::write() {
|
||||
effects.close();
|
||||
foreach(const IfcGeom::Material& material, materials) {
|
||||
BOOST_FOREACH(const IfcGeom::Material& material, materials) {
|
||||
std::string material_name = (serializer->settings().get(SerializerSettings::USE_MATERIAL_NAMES)
|
||||
? material.original_name() : material.name());
|
||||
std::string material_name_unescaped = material_name; // workaround double-escaping that would occur in addInstanceEffect()
|
||||
@@ -410,7 +410,7 @@ void ColladaSerializer::ColladaExporter::write(const IfcGeom::TriangulationEleme
|
||||
collada_id(representation_id);
|
||||
|
||||
std::vector<std::string> material_references;
|
||||
foreach(const IfcGeom::Material& material, mesh.materials()) {
|
||||
BOOST_FOREACH(const IfcGeom::Material& material, mesh.materials()) {
|
||||
if (!materials.contains(material)) {
|
||||
materials.add(material);
|
||||
}
|
||||
|
||||
@@ -913,7 +913,7 @@ void validate(boost::any& v, const std::vector<std::string>& values, exclusion_t
|
||||
std::vector<IfcGeom::filter_t> setup_filters(const std::vector<geom_filter>& filters, const std::string& output_extension)
|
||||
{
|
||||
std::vector<IfcGeom::filter_t> filter_funcs;
|
||||
foreach(const geom_filter& f, filters) {
|
||||
BOOST_FOREACH(const geom_filter& f, filters) {
|
||||
if (f.type == geom_filter::ENTITY_TYPE) {
|
||||
entity_filter.include = f.include;
|
||||
entity_filter.traverse = f.traverse;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/xml_parser.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include "XmlSerializer.h"
|
||||
|
||||
@@ -340,16 +341,16 @@ void XmlSerializer::finalize() {
|
||||
ptree root, header, units, decomposition, properties, quantities, types, layers, materials;
|
||||
|
||||
// Write the SPF header as XML nodes.
|
||||
foreach(const std::string& s, file->header().file_description().description()) {
|
||||
BOOST_FOREACH(const std::string& s, file->header().file_description().description()) {
|
||||
header.add_child("file_description.description", ptree(s));
|
||||
}
|
||||
foreach(const std::string& s, file->header().file_name().author()) {
|
||||
BOOST_FOREACH(const std::string& s, file->header().file_name().author()) {
|
||||
header.add_child("file_name.author", ptree(s));
|
||||
}
|
||||
foreach(const std::string& s, file->header().file_name().organization()) {
|
||||
BOOST_FOREACH(const std::string& s, file->header().file_name().organization()) {
|
||||
header.add_child("file_name.organization", ptree(s));
|
||||
}
|
||||
foreach(const std::string& s, file->header().file_schema().schema_identifiers()) {
|
||||
BOOST_FOREACH(const std::string& s, file->header().file_schema().schema_identifiers()) {
|
||||
header.add_child("file_schema.schema_identifiers", ptree(s));
|
||||
}
|
||||
header.put("file_description.implementation_level", file->header().file_description().implementation_level());
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "IfcGeom.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
@@ -87,7 +88,7 @@ namespace IfcGeom
|
||||
void populate(const std::set<std::string>& patterns)
|
||||
{
|
||||
values.clear();
|
||||
foreach(const std::string &pattern, patterns) {
|
||||
BOOST_FOREACH(const std::string &pattern, patterns) {
|
||||
values.insert(wildcard_string_to_regex(pattern));
|
||||
}
|
||||
}
|
||||
@@ -96,7 +97,7 @@ namespace IfcGeom
|
||||
|
||||
static bool match_values(const std::set<boost::regex>& values, const std::string &str)
|
||||
{
|
||||
foreach(const boost::regex& r, values) {
|
||||
BOOST_FOREACH(const boost::regex& r, values) {
|
||||
if (boost::regex_match(str, r)) {
|
||||
return true;
|
||||
}
|
||||
@@ -108,7 +109,7 @@ namespace IfcGeom
|
||||
{
|
||||
// Escape all non-"*?" regex special chars
|
||||
static const std::string special_chars = "\\^.$|()[]+/";
|
||||
foreach(char c, special_chars) {
|
||||
BOOST_FOREACH(char c, special_chars) {
|
||||
std::string char_str(1, c);
|
||||
boost::replace_all(str, char_str, "\\" + char_str);
|
||||
}
|
||||
@@ -180,7 +181,7 @@ namespace IfcGeom
|
||||
|
||||
ss << (traverse ? "traverse " : "") << (include ? "include" : "exclude");
|
||||
std::vector<std::string> patterns;
|
||||
foreach(const boost::regex& r, values) {
|
||||
BOOST_FOREACH(const boost::regex& r, values) {
|
||||
patterns.push_back("\"" + r.str() + "\"");
|
||||
}
|
||||
|
||||
@@ -237,7 +238,7 @@ namespace IfcGeom
|
||||
std::stringstream ss;
|
||||
ss << (traverse ? "traverse " : "") << (include ? "include" : "exclude") << " layers";
|
||||
std::vector<std::string> str_values;
|
||||
foreach(const boost::regex& r, values) {
|
||||
BOOST_FOREACH(const boost::regex& r, values) {
|
||||
str_values.push_back(" \"" + r.str() + "\"");
|
||||
}
|
||||
ss << boost::algorithm::join(str_values, " ");
|
||||
@@ -259,7 +260,7 @@ namespace IfcGeom
|
||||
void populate(const std::set<std::string>& types)
|
||||
{
|
||||
values.clear();
|
||||
foreach(const std::string& type, types) {
|
||||
BOOST_FOREACH(const std::string& type, types) {
|
||||
IfcSchema::Type::Enum ty;
|
||||
try {
|
||||
ty = IfcSchema::Type::FromString(boost::to_upper_copy(type));
|
||||
@@ -274,7 +275,7 @@ namespace IfcGeom
|
||||
bool match(IfcSchema::IfcProduct* prod) const
|
||||
{
|
||||
// The set is iterated over to able to filter on subtypes.
|
||||
foreach(IfcSchema::Type::Enum type, values) {
|
||||
BOOST_FOREACH(IfcSchema::Type::Enum type, values) {
|
||||
if (prod->is(type)) {
|
||||
return true;
|
||||
}
|
||||
@@ -291,7 +292,7 @@ namespace IfcGeom
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << (traverse ? "traverse " : "") << (include ? "include" : "exclude") << " entities";
|
||||
foreach(IfcSchema::Type::Enum type, values) {
|
||||
BOOST_FOREACH(IfcSchema::Type::Enum type, values) {
|
||||
ss << " " << IfcSchema::Type::ToString(type);
|
||||
}
|
||||
description = ss.str();
|
||||
|
||||
@@ -38,10 +38,6 @@
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/dynamic_bitset.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#define foreach BOOST_FOREACH
|
||||
#define rforeach BOOST_REVERSE_FOREACH
|
||||
|
||||
class Argument;
|
||||
class IfcEntityList;
|
||||
|
||||
Reference in New Issue
Block a user