Fix errors after merge

This commit is contained in:
Thomas Krijnen
2019-03-08 17:22:05 +01:00
parent ac4be43170
commit 2a026e93d5
3 changed files with 5 additions and 30 deletions
+3 -12
View File
@@ -99,7 +99,7 @@ void print_usage(bool suggest_help = true)
<< " .svg SVG Scalable Vector Graphics (2D floor plan)\n"
<< " .ifc IFC-SPF Industry Foundation Classes\n"
<< "\n"
<< "If no output filename given, <input>." + IfcUtil::path::from_utf8(DEFAULT_EXTENSION) + " will be used as the output file.\n";
<< "If no output filename given, <input>." << IfcUtil::path::from_utf8(DEFAULT_EXTENSION) << " will be used as the output file.\n";
if (suggest_help) {
cout_ << "\nRun 'IfcConvert --help' for more information.";
}
@@ -209,15 +209,6 @@ int main(int argc, char** argv) {
#endif
("input-file", new po::typed_value<path_t, char_t>(0), "input IFC file")
("output-file", new po::typed_value<path_t, char_t>(0), "output geometry file");
double deflection_tolerance;
inclusion_filter include_filter;
inclusion_traverse_filter include_traverse_filter;
exclusion_filter exclude_filter;
exclusion_traverse_filter exclude_traverse_filter;
std::string filter_filename;
std::string default_material_filename;
po::options_description ifc_options("IFC options");
ifc_options.add_options()
@@ -531,7 +522,7 @@ int main(int argc, char** argv) {
STP = IfcUtil::path::from_utf8(".stp"),
IGS = IfcUtil::path::from_utf8(".igs"),
SVG = IfcUtil::path::from_utf8(".svg"),
XML = IfcUtil::path::from_utf8(".xml");
XML = IfcUtil::path::from_utf8(".xml"),
IFC = IfcUtil::path::from_utf8(".ifc");
// @todo clean up serializer selection
@@ -559,7 +550,7 @@ int main(int argc, char** argv) {
} else if (output_extension == IFC) {
int exit_code = EXIT_FAILURE;
try {
if (init_input_file(input_filename, ifc_file, no_progress || quiet, mmap)) {
if (init_input_file(IfcUtil::path::to_utf8(input_filename), ifc_file, no_progress || quiet, mmap)) {
time_t start, end;
time(&start);
std::ofstream fs(output_filename.c_str());
+2 -14
View File
@@ -49,12 +49,12 @@ namespace {
void plain_text_message(T& os, const boost::optional<IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
os << "[" << severity_strings<typename T::char_type>::value[type] << "] ";
if (current_product) {
std::string global_id = *(**current_product).get("GlobalId"));
std::string global_id = *((IfcUtil::IfcBaseEntity*)*current_product)->get("GlobalId");
os << "{" << global_id.c_str() << "} ";
}
os << message.c_str() << std::endl;
if (instance) {
std::string instance_string = entity->data().toString();
std::string instance_string = instance->data().toString();
if (instance_string.size() > 259) {
instance_string = instance_string.substr(0, 256) + "...";
}
@@ -113,18 +113,6 @@ void Logger::SetOutput(std::wostream* l1, std::wostream* l2) {
}
}
template <typename T>
void Logger::log(T& log2, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
log2 << "[" << severity_strings<typename T::char_type>::value[type] << "] ";
if (current_product) {
log2 << "{" << (*current_product)->GlobalId().c_str() << "} ";
}
log2 << message.c_str() << std::endl;
if (instance) {
log2 << instance->data().toString().c_str() << std::endl;
}
}
void Logger::Message(Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
if ((log2 || wlog2) && type >= verbosity) {
if (format == FMT_PLAIN) {
-4
View File
@@ -53,10 +53,6 @@ private:
static Format format;
static boost::optional<IfcUtil::IfcBaseClass*> current_product;
static Severity max_severity;
static boost::optional<IfcSchema::IfcProduct*> current_product;
template <typename T>
static void log(T& log2, Logger::Severity type, const std::string& message, IfcUtil::IfcBaseClass* instance);
public:
static void SetProduct(boost::optional<IfcUtil::IfcBaseClass*> product);