text: /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */
  #include <sstream>
  #include <limits>
  
  #include "ifcpp/model/AttributeObject.h"
  #include "ifcpp/model/BuildingException.h"
  #include "ifcpp/model/BuildingGuid.h"
  #include "ifcpp/reader/ReaderUtil.h"
  #include "ifcpp/writer/WriterUtil.h"
  #include "ifcpp/IFC4/include/IfcCartesianPoint.h"
  #include "ifcpp/IFC4/include/IfcColourRgb.h"
  #include "ifcpp/IFC4/include/IfcLabel.h"
  #include "ifcpp/IFC4/include/IfcLightSourcePositional.h"
  #include "ifcpp/IFC4/include/IfcNormalisedRatioMeasure.h"
  #include "ifcpp/IFC4/include/IfcPositiveLengthMeasure.h"
  #include "ifcpp/IFC4/include/IfcPresentationLayerAssignment.h"
  #include "ifcpp/IFC4/include/IfcReal.h"
  #include "ifcpp/IFC4/include/IfcStyledItem.h"
  
  // ENTITY IfcLightSourcePositional 
  IfcLightSourcePositional::IfcLightSourcePositional( int id ) { m_entity_id = id; }
  shared_ptr<BuildingObject> IfcLightSourcePositional::getDeepCopy( BuildingCopyOptions& options )
  {
  	shared_ptr<IfcLightSourcePositional> copy_self( new IfcLightSourcePositional() );
  	if( m_Name ) { copy_self->m_Name = dynamic_pointer_cast<IfcLabel>( m_Name->getDeepCopy(options) ); }
  	if( m_LightColour ) { copy_self->m_LightColour = dynamic_pointer_cast<IfcColourRgb>( m_LightColour->getDeepCopy(options) ); }
  	if( m_AmbientIntensity ) { copy_self->m_AmbientIntensity = dynamic_pointer_cast<IfcNormalisedRatioMeasure>( m_AmbientIntensity->getDeepCopy(options) ); }
  	if( m_Intensity ) { copy_self->m_Intensity = dynamic_pointer_cast<IfcNormalisedRatioMeasure>( m_Intensity->getDeepCopy(options) ); }
  	if( m_Position ) { copy_self->m_Position = dynamic_pointer_cast<IfcCartesianPoint>( m_Position->getDeepCopy(options) ); }
  	if( m_Radius ) { copy_self->m_Radius = dynamic_pointer_cast<IfcPositiveLengthMeasure>( m_Radius->getDeepCopy(options) ); }
  	if( m_ConstantAttenuation ) { copy_self->m_ConstantAttenuation = dynamic_pointer_cast<IfcReal>( m_ConstantAttenuation->getDeepCopy(options) ); }
  	if( m_DistanceAttenuation ) { copy_self->m_DistanceAttenuation = dynamic_pointer_cast<IfcReal>( m_DistanceAttenuation->getDeepCopy(options) ); }
  	if( m_QuadricAttenuation ) { copy_self->m_QuadricAttenuation = dynamic_pointer_cast<IfcReal>( m_QuadricAttenuation->getDeepCopy(options) ); }
  	return copy_self;
  }
  void IfcLightSourcePositional::getStepLine( std::stringstream& stream ) const
  {
  	stream << "#" << m_entity_id << "= IFCLIGHTSOURCEPOSITIONAL" << "(";
  	if( m_Name ) { m_Name->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_LightColour ) { stream << "#" << m_LightColour->m_entity_id; } else { stream << "$"; }
  	stream << ",";
  	if( m_AmbientIntensity ) { m_AmbientIntensity->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_Intensity ) { m_Intensity->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_Position ) { stream << "#" << m_Position->m_entity_id; } else { stream << "$"; }
  	stream << ",";
  	if( m_Radius ) { m_Radius->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_ConstantAttenuation ) { m_ConstantAttenuation->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_DistanceAttenuation ) { m_DistanceAttenuation->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_QuadricAttenuation ) { m_QuadricAttenuation->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ");";
  }
  void IfcLightSourcePositional::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_entity_id; }
  const std::wstring IfcLightSourcePositional::toString() const { return L"IfcLightSourcePositional"; }
  void IfcLightSourcePositional::readStepArguments( const std::vector<std::wstring>& args, const std::map<int,shared_ptr<BuildingEntity> >& map )
  {
  	const size_t num_args = args.size();
  	if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightSourcePositional, expecting 9, having " << num_args << ". Entity ID: " << m_entity_id << std::endl; throw BuildingException( err.str().c_str() ); }
  	m_Name = IfcLabel::createObjectFromSTEP( args[0], map );
  	readEntityReference( args[1], m_LightColour, map );
  	m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map );
  	m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map );
  	readEntityReference( args[4], m_Position, map );
  	m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map );
  	m_ConstantAttenuation = IfcReal::createObjectFromSTEP( args[6], map );
  	m_DistanceAttenuation = IfcReal::createObjectFromSTEP( args[7], map );
  	m_QuadricAttenuation = IfcReal::createObjectFromSTEP( args[8], map );
  }
  void IfcLightSourcePositional::getAttributes( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes ) const
  {
  	IfcLightSource::getAttributes( vec_attributes );
  	vec_attributes.emplace_back( std::make_pair( "Position", m_Position ) );
  	vec_attributes.emplace_back( std::make_pair( "Radius", m_Radius ) );
  	vec_attributes.emplace_back( std::make_pair( "ConstantAttenuation", m_ConstantAttenuation ) );
  	vec_attributes.emplace_back( std::make_pair( "DistanceAttenuation", m_DistanceAttenuation ) );
  	vec_attributes.emplace_back( std::make_pair( "QuadricAttenuation", m_QuadricAttenuation ) );
  }
  void IfcLightSourcePositional::getAttributesInverse( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes_inverse ) const
  {
  	IfcLightSource::getAttributesInverse( vec_attributes_inverse );
  }
  void IfcLightSourcePositional::setInverseCounterparts( shared_ptr<BuildingEntity> ptr_self_entity )
  {
  	IfcLightSource::setInverseCounterparts( ptr_self_entity );
  }
  void IfcLightSourcePositional::unlinkFromInverseCounterparts()
  {
  	IfcLightSource::unlinkFromInverseCounterparts();
  }
  