mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 10:59:17 +00:00
#1807 method mapping proposal
This commit is contained in:
@@ -134,3 +134,18 @@ const IfcParse::schema_definition* IfcParse::schema_by_name(const std::string& n
|
||||
}
|
||||
return it->second;
|
||||
}
|
||||
|
||||
std::vector<std::string> IfcParse::schema_names() {
|
||||
// Load schema modules
|
||||
try {
|
||||
IfcParse::schema_by_name("IFC2X3");
|
||||
} catch (IfcParse::IfcException&) {}
|
||||
|
||||
// Populate vector with map keys
|
||||
std::vector<std::string> return_value;
|
||||
for (auto& pair : schemas) {
|
||||
return_value.push_back(pair.first);
|
||||
}
|
||||
|
||||
return return_value;
|
||||
}
|
||||
|
||||
@@ -448,7 +448,9 @@ namespace IfcParse {
|
||||
|
||||
IFC_PARSE_API const schema_definition* schema_by_name(const std::string&);
|
||||
|
||||
void register_schema(schema_definition*);
|
||||
IFC_PARSE_API std::vector<std::string> schema_names();
|
||||
|
||||
IFC_PARSE_API void register_schema(schema_definition*);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user