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/IfcAppliedValue.h"
  #include "ifcpp/IFC4/include/IfcGloballyUniqueId.h"
  #include "ifcpp/IFC4/include/IfcIdentifier.h"
  #include "ifcpp/IFC4/include/IfcLabel.h"
  #include "ifcpp/IFC4/include/IfcLaborResource.h"
  #include "ifcpp/IFC4/include/IfcLaborResourceTypeEnum.h"
  #include "ifcpp/IFC4/include/IfcOwnerHistory.h"
  #include "ifcpp/IFC4/include/IfcPhysicalQuantity.h"
  #include "ifcpp/IFC4/include/IfcRelAggregates.h"
  #include "ifcpp/IFC4/include/IfcRelAssigns.h"
  #include "ifcpp/IFC4/include/IfcRelAssignsToResource.h"
  #include "ifcpp/IFC4/include/IfcRelAssociates.h"
  #include "ifcpp/IFC4/include/IfcRelDeclares.h"
  #include "ifcpp/IFC4/include/IfcRelDefinesByObject.h"
  #include "ifcpp/IFC4/include/IfcRelDefinesByProperties.h"
  #include "ifcpp/IFC4/include/IfcRelDefinesByType.h"
  #include "ifcpp/IFC4/include/IfcRelNests.h"
  #include "ifcpp/IFC4/include/IfcResourceTime.h"
  #include "ifcpp/IFC4/include/IfcText.h"
  
  // ENTITY IfcLaborResource 
  IfcLaborResource::IfcLaborResource( int id ) { m_entity_id = id; }
  shared_ptr<BuildingObject> IfcLaborResource::getDeepCopy( BuildingCopyOptions& options )
  {
  	shared_ptr<IfcLaborResource> copy_self( new IfcLaborResource() );
  	if( m_GlobalId )
  	{
  		if( options.create_new_IfcGloballyUniqueId ) { copy_self->m_GlobalId = make_shared<IfcGloballyUniqueId>( createBase64Uuid<wchar_t>().data() ); }
  		else { copy_self->m_GlobalId = dynamic_pointer_cast<IfcGloballyUniqueId>( m_GlobalId->getDeepCopy(options) ); }
  	}
  	if( m_OwnerHistory )
  	{
  		if( options.shallow_copy_IfcOwnerHistory ) { copy_self->m_OwnerHistory = m_OwnerHistory; }
  		else { copy_self->m_OwnerHistory = dynamic_pointer_cast<IfcOwnerHistory>( m_OwnerHistory->getDeepCopy(options) ); }
  	}
  	if( m_Name ) { copy_self->m_Name = dynamic_pointer_cast<IfcLabel>( m_Name->getDeepCopy(options) ); }
  	if( m_Description ) { copy_self->m_Description = dynamic_pointer_cast<IfcText>( m_Description->getDeepCopy(options) ); }
  	if( m_ObjectType ) { copy_self->m_ObjectType = dynamic_pointer_cast<IfcLabel>( m_ObjectType->getDeepCopy(options) ); }
  	if( m_Identification ) { copy_self->m_Identification = dynamic_pointer_cast<IfcIdentifier>( m_Identification->getDeepCopy(options) ); }
  	if( m_LongDescription ) { copy_self->m_LongDescription = dynamic_pointer_cast<IfcText>( m_LongDescription->getDeepCopy(options) ); }
  	if( m_Usage ) { copy_self->m_Usage = dynamic_pointer_cast<IfcResourceTime>( m_Usage->getDeepCopy(options) ); }
  	for( size_t ii=0; ii<m_BaseCosts.size(); ++ii )
  	{
  		auto item_ii = m_BaseCosts[ii];
  		if( item_ii )
  		{
  			copy_self->m_BaseCosts.emplace_back( dynamic_pointer_cast<IfcAppliedValue>(item_ii->getDeepCopy(options) ) );
  		}
  	}
  	if( m_BaseQuantity ) { copy_self->m_BaseQuantity = dynamic_pointer_cast<IfcPhysicalQuantity>( m_BaseQuantity->getDeepCopy(options) ); }
  	if( m_PredefinedType ) { copy_self->m_PredefinedType = dynamic_pointer_cast<IfcLaborResourceTypeEnum>( m_PredefinedType->getDeepCopy(options) ); }
  	return copy_self;
  }
  void IfcLaborResource::getStepLine( std::stringstream& stream ) const
  {
  	stream << "#" << m_entity_id << "= IFCLABORRESOURCE" << "(";
  	if( m_GlobalId ) { m_GlobalId->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_OwnerHistory ) { stream << "#" << m_OwnerHistory->m_entity_id; } else { stream << "$"; }
  	stream << ",";
  	if( m_Name ) { m_Name->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_Description ) { m_Description->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_ObjectType ) { m_ObjectType->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_Identification ) { m_Identification->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_LongDescription ) { m_LongDescription->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ",";
  	if( m_Usage ) { stream << "#" << m_Usage->m_entity_id; } else { stream << "$"; }
  	stream << ",";
  	writeEntityList( stream, m_BaseCosts );
  	stream << ",";
  	if( m_BaseQuantity ) { stream << "#" << m_BaseQuantity->m_entity_id; } else { stream << "$"; }
  	stream << ",";
  	if( m_PredefinedType ) { m_PredefinedType->getStepParameter( stream ); } else { stream << "$"; }
  	stream << ");";
  }
  void IfcLaborResource::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_entity_id; }
  const std::wstring IfcLaborResource::toString() const { return L"IfcLaborResource"; }
  void IfcLaborResource::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 != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLaborResource, expecting 11, having " << num_args << ". Entity ID: " << m_entity_id << std::endl; throw BuildingException( err.str().c_str() ); }
  	m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map );
  	readEntityReference( args[1], m_OwnerHistory, map );
  	m_Name = IfcLabel::createObjectFromSTEP( args[2], map );
  	m_Description = IfcText::createObjectFromSTEP( args[3], map );
  	m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map );
  	m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map );
  	m_LongDescription = IfcText::createObjectFromSTEP( args[6], map );
  	readEntityReference( args[7], m_Usage, map );
  	readEntityReferenceList( args[8], m_BaseCosts, map );
  	readEntityReference( args[9], m_BaseQuantity, map );
  	m_PredefinedType = IfcLaborResourceTypeEnum::createObjectFromSTEP( args[10], map );
  }
  void IfcLaborResource::getAttributes( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes ) const
  {
  	IfcConstructionResource::getAttributes( vec_attributes );
  	vec_attributes.emplace_back( std::make_pair( "PredefinedType", m_PredefinedType ) );
  }
  void IfcLaborResource::getAttributesInverse( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes_inverse ) const
  {
  	IfcConstructionResource::getAttributesInverse( vec_attributes_inverse );
  }
  void IfcLaborResource::setInverseCounterparts( shared_ptr<BuildingEntity> ptr_self_entity )
  {
  	IfcConstructionResource::setInverseCounterparts( ptr_self_entity );
  }
  void IfcLaborResource::unlinkFromInverseCounterparts()
  {
  	IfcConstructionResource::unlinkFromInverseCounterparts();
  }
  