#2037 Option to optain declaration from early bound select definitions

This commit is contained in:
Thomas Krijnen
2022-02-10 13:06:04 +01:00
parent 618d902a57
commit 5af7e95bee
2 changed files with 20 additions and 1 deletions
@@ -137,7 +137,10 @@ simpletype_impl_cast_templated = (
simpletype_impl_declaration = "return *%(schema_name_upper)s_%(class_name)s_type;"
select = """%(documentation)s
class IFC_PARSE_API %(name)s : public virtual IfcUtil::IfcBaseInterface {};
class IFC_PARSE_API %(name)s : public virtual IfcUtil::IfcBaseInterface {
public:
static const IfcParse::select_type& Class();
};
"""
enumeration = """class IFC_PARSE_API %(name)s : public IfcUtil::IfcBaseType {
@@ -167,6 +170,10 @@ public:
};
"""
select_function = """
const IfcParse::select_type& %(schema_name)s::%(name)s::Class() { return *%(schema_name_upper)s_%(name)s_type; }
"""
enumeration_function = """
const IfcParse::enumeration_type& %(schema_name)s::%(name)s::declaration() const { return *%(schema_name_upper)s_%(name)s_type; }
const IfcParse::enumeration_type& %(schema_name)s::%(name)s::Class() { return *%(schema_name_upper)s_%(name)s_type; }