|
| 1 | +/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ |
| 2 | +#include <sstream> |
| 3 | +#include <limits> |
| 4 | + |
| 5 | +#include "ifcpp/model/AttributeObject.h" |
| 6 | +#include "ifcpp/model/BuildingException.h" |
| 7 | +#include "ifcpp/model/BuildingGuid.h" |
| 8 | +#include "ifcpp/reader/ReaderUtil.h" |
| 9 | +#include "ifcpp/writer/WriterUtil.h" |
| 10 | +#include "ifcpp/IFC4X3/include/IfcBoolean.h" |
| 11 | +#include "ifcpp/IFC4X3/include/IfcDoorStyle.h" |
| 12 | +#include "ifcpp/IFC4X3/include/IfcDoorStyleConstructionEnum.h" |
| 13 | +#include "ifcpp/IFC4X3/include/IfcDoorStyleOperationEnum.h" |
| 14 | +#include "ifcpp/IFC4X3/include/IfcGloballyUniqueId.h" |
| 15 | +#include "ifcpp/IFC4X3/include/IfcIdentifier.h" |
| 16 | +#include "ifcpp/IFC4X3/include/IfcLabel.h" |
| 17 | +#include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" |
| 18 | +#include "ifcpp/IFC4X3/include/IfcPropertySetDefinition.h" |
| 19 | +#include "ifcpp/IFC4X3/include/IfcRelAggregates.h" |
| 20 | +#include "ifcpp/IFC4X3/include/IfcRelAssigns.h" |
| 21 | +#include "ifcpp/IFC4X3/include/IfcRelAssignsToProduct.h" |
| 22 | +#include "ifcpp/IFC4X3/include/IfcRelAssociates.h" |
| 23 | +#include "ifcpp/IFC4X3/include/IfcRelDeclares.h" |
| 24 | +#include "ifcpp/IFC4X3/include/IfcRelDefinesByType.h" |
| 25 | +#include "ifcpp/IFC4X3/include/IfcRelNests.h" |
| 26 | +#include "ifcpp/IFC4X3/include/IfcRepresentationMap.h" |
| 27 | +#include "ifcpp/IFC4X3/include/IfcText.h" |
| 28 | + |
| 29 | +// ENTITY IfcDoorStyle |
| 30 | +IFC4X3::IfcDoorStyle::IfcDoorStyle( int tag ) { m_tag = tag; } |
| 31 | +shared_ptr<BuildingObject> IFC4X3::IfcDoorStyle::getDeepCopy( BuildingCopyOptions& options ) |
| 32 | +{ |
| 33 | + shared_ptr<IfcDoorStyle> copy_self( new IfcDoorStyle() ); |
| 34 | + if( m_GlobalId ) |
| 35 | + { |
| 36 | + if( options.create_new_IfcGloballyUniqueId ) { copy_self->m_GlobalId = make_shared<IfcGloballyUniqueId>( createBase64Uuid().data() ); } |
| 37 | + else { copy_self->m_GlobalId = dynamic_pointer_cast<IfcGloballyUniqueId>( m_GlobalId->getDeepCopy(options) ); } |
| 38 | + } |
| 39 | + if( m_OwnerHistory ) |
| 40 | + { |
| 41 | + if( options.shallow_copy_IfcOwnerHistory ) { copy_self->m_OwnerHistory = m_OwnerHistory; } |
| 42 | + else { copy_self->m_OwnerHistory = dynamic_pointer_cast<IfcOwnerHistory>( m_OwnerHistory->getDeepCopy(options) ); } |
| 43 | + } |
| 44 | + if( m_Name ) { copy_self->m_Name = dynamic_pointer_cast<IfcLabel>( m_Name->getDeepCopy(options) ); } |
| 45 | + if( m_Description ) { copy_self->m_Description = dynamic_pointer_cast<IfcText>( m_Description->getDeepCopy(options) ); } |
| 46 | + if( m_ApplicableOccurrence ) { copy_self->m_ApplicableOccurrence = dynamic_pointer_cast<IfcIdentifier>( m_ApplicableOccurrence->getDeepCopy(options) ); } |
| 47 | + for( size_t ii=0; ii<m_HasPropertySets.size(); ++ii ) |
| 48 | + { |
| 49 | + auto item_ii = m_HasPropertySets[ii]; |
| 50 | + if( item_ii ) |
| 51 | + { |
| 52 | + copy_self->m_HasPropertySets.emplace_back( dynamic_pointer_cast<IfcPropertySetDefinition>(item_ii->getDeepCopy(options) ) ); |
| 53 | + } |
| 54 | + } |
| 55 | + for( size_t ii=0; ii<m_RepresentationMaps.size(); ++ii ) |
| 56 | + { |
| 57 | + auto item_ii = m_RepresentationMaps[ii]; |
| 58 | + if( item_ii ) |
| 59 | + { |
| 60 | + copy_self->m_RepresentationMaps.emplace_back( dynamic_pointer_cast<IfcRepresentationMap>(item_ii->getDeepCopy(options) ) ); |
| 61 | + } |
| 62 | + } |
| 63 | + if( m_Tag ) { copy_self->m_Tag = dynamic_pointer_cast<IfcLabel>( m_Tag->getDeepCopy(options) ); } |
| 64 | + if( m_OperationType ) { copy_self->m_OperationType = dynamic_pointer_cast<IfcDoorStyleOperationEnum>( m_OperationType->getDeepCopy(options) ); } |
| 65 | + if( m_ConstructionType ) { copy_self->m_ConstructionType = dynamic_pointer_cast<IfcDoorStyleConstructionEnum>( m_ConstructionType->getDeepCopy(options) ); } |
| 66 | + if( m_ParameterTakesPrecedence ) { copy_self->m_ParameterTakesPrecedence = dynamic_pointer_cast<IfcBoolean>( m_ParameterTakesPrecedence->getDeepCopy(options) ); } |
| 67 | + if( m_Sizeable ) { copy_self->m_Sizeable = dynamic_pointer_cast<IfcBoolean>( m_Sizeable->getDeepCopy(options) ); } |
| 68 | + return copy_self; |
| 69 | +} |
| 70 | +void IFC4X3::IfcDoorStyle::getStepLine( std::stringstream& stream ) const |
| 71 | +{ |
| 72 | + stream << "#" << m_tag << "= IFCDOORSTYLE" << "("; |
| 73 | + if( m_GlobalId ) { m_GlobalId->getStepParameter( stream ); } else { stream << "$"; } |
| 74 | + stream << ","; |
| 75 | + if( m_OwnerHistory ) { stream << "#" << m_OwnerHistory->m_tag; } else { stream << "$"; } |
| 76 | + stream << ","; |
| 77 | + if( m_Name ) { m_Name->getStepParameter( stream ); } else { stream << "$"; } |
| 78 | + stream << ","; |
| 79 | + if( m_Description ) { m_Description->getStepParameter( stream ); } else { stream << "$"; } |
| 80 | + stream << ","; |
| 81 | + if( m_ApplicableOccurrence ) { m_ApplicableOccurrence->getStepParameter( stream ); } else { stream << "$"; } |
| 82 | + stream << ","; |
| 83 | + writeEntityList( stream, m_HasPropertySets ); |
| 84 | + stream << ","; |
| 85 | + writeEntityList( stream, m_RepresentationMaps ); |
| 86 | + stream << ","; |
| 87 | + if( m_Tag ) { m_Tag->getStepParameter( stream ); } else { stream << "$"; } |
| 88 | + stream << ","; |
| 89 | + if( m_OperationType ) { m_OperationType->getStepParameter( stream ); } else { stream << "$"; } |
| 90 | + stream << ","; |
| 91 | + if( m_ConstructionType ) { m_ConstructionType->getStepParameter( stream ); } else { stream << "$"; } |
| 92 | + stream << ","; |
| 93 | + if( m_ParameterTakesPrecedence ) { m_ParameterTakesPrecedence->getStepParameter( stream ); } else { stream << "$"; } |
| 94 | + stream << ","; |
| 95 | + if( m_Sizeable ) { m_Sizeable->getStepParameter( stream ); } else { stream << "$"; } |
| 96 | + stream << ");"; |
| 97 | +} |
| 98 | +void IFC4X3::IfcDoorStyle::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_tag; } |
| 99 | +void IFC4X3::IfcDoorStyle::readStepArguments( const std::vector<std::string>& args, const std::map<int,shared_ptr<BuildingEntity> >& map, std::stringstream& errorStream ) |
| 100 | +{ |
| 101 | + const size_t num_args = args.size(); |
| 102 | + if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDoorStyle, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } |
| 103 | + m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); |
| 104 | + readEntityReference( args[1], m_OwnerHistory, map, errorStream ); |
| 105 | + m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); |
| 106 | + m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); |
| 107 | + m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); |
| 108 | + readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); |
| 109 | + readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); |
| 110 | + m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); |
| 111 | + m_OperationType = IfcDoorStyleOperationEnum::createObjectFromSTEP( args[8], map, errorStream ); |
| 112 | + m_ConstructionType = IfcDoorStyleConstructionEnum::createObjectFromSTEP( args[9], map, errorStream ); |
| 113 | + m_ParameterTakesPrecedence = IfcBoolean::createObjectFromSTEP( args[10], map, errorStream ); |
| 114 | + m_Sizeable = IfcBoolean::createObjectFromSTEP( args[11], map, errorStream ); |
| 115 | +} |
| 116 | +void IFC4X3::IfcDoorStyle::getAttributes( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes ) const |
| 117 | +{ |
| 118 | + IFC4X3::IfcTypeProduct::getAttributes( vec_attributes ); |
| 119 | + vec_attributes.emplace_back( std::make_pair( "OperationType", m_OperationType ) ); |
| 120 | + vec_attributes.emplace_back( std::make_pair( "ConstructionType", m_ConstructionType ) ); |
| 121 | + vec_attributes.emplace_back( std::make_pair( "ParameterTakesPrecedence", m_ParameterTakesPrecedence ) ); |
| 122 | + vec_attributes.emplace_back( std::make_pair( "Sizeable", m_Sizeable ) ); |
| 123 | +} |
| 124 | +void IFC4X3::IfcDoorStyle::getAttributesInverse( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes_inverse ) const |
| 125 | +{ |
| 126 | + IFC4X3::IfcTypeProduct::getAttributesInverse( vec_attributes_inverse ); |
| 127 | +} |
| 128 | +void IFC4X3::IfcDoorStyle::setInverseCounterparts( shared_ptr<BuildingEntity> ptr_self_entity ) |
| 129 | +{ |
| 130 | + IfcTypeProduct::setInverseCounterparts( ptr_self_entity ); |
| 131 | +} |
| 132 | +void IFC4X3::IfcDoorStyle::unlinkFromInverseCounterparts() |
| 133 | +{ |
| 134 | + IfcTypeProduct::unlinkFromInverseCounterparts(); |
| 135 | +} |
0 commit comments