tumcms / Open-Infra-Platform

This is the official repository of the open-source Open Infra Platform software (as of April 2020).
Other
48 stars 22 forks source link

corrected getStepLine to account for qualified attributes #457

Closed pjanck closed 3 years ago

pjanck commented 3 years ago

Fixes #456

getStepLine of e.g. IfcSIUnit should now correctly return * for its first attribute in STEP serialization:

        /*!
         * \brief Returns the STEP serialization.
         * 
         * \return #ID=IfcSIUnit(<attributes>);
         */
        const std::string IfcSIUnit::getStepLine() const {
            std::string classname = this->classname();
            boost::to_upper(classname);
            std::string stepLine = this->getStepParameter() + "=" + classname + "(";
            stepLine += "*,"; // Dimensions is a qualified attribute of IfcSIUnit
            stepLine += UnitType.getStepParameter() + ",";
            stepLine += Prefix.getStepParameter() + ",";
            stepLine += Name.getStepParameter() + ");";
            return stepLine;
        }