/* 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/IfcLabel.h"
#include "ifcpp/IFC4/include/IfcStructuralLoadTemperature.h"
#include "ifcpp/IFC4/include/IfcThermodynamicTemperatureMeasure.h"

// ENTITY IfcStructuralLoadTemperature 
IfcStructuralLoadTemperature::IfcStructuralLoadTemperature( int id ) { m_entity_id = id; }
IfcStructuralLoadTemperature::~IfcStructuralLoadTemperature() {}
shared_ptr<BuildingObject> IfcStructuralLoadTemperature::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcStructuralLoadTemperature> copy_self( new IfcStructuralLoadTemperature() );
	if( m_Name ) { copy_self->m_Name = dynamic_pointer_cast<IfcLabel>( m_Name->getDeepCopy(options) ); }
	if( m_DeltaTConstant ) { copy_self->m_DeltaTConstant = dynamic_pointer_cast<IfcThermodynamicTemperatureMeasure>( m_DeltaTConstant->getDeepCopy(options) ); }
	if( m_DeltaTY ) { copy_self->m_DeltaTY = dynamic_pointer_cast<IfcThermodynamicTemperatureMeasure>( m_DeltaTY->getDeepCopy(options) ); }
	if( m_DeltaTZ ) { copy_self->m_DeltaTZ = dynamic_pointer_cast<IfcThermodynamicTemperatureMeasure>( m_DeltaTZ->getDeepCopy(options) ); }
	return copy_self;
}
void IfcStructuralLoadTemperature::getStepLine( std::stringstream& stream ) const
{
	stream << "#" << m_entity_id << "= IFCSTRUCTURALLOADTEMPERATURE" << "(";
	if( m_Name ) { m_Name->getStepParameter( stream ); } else { stream << "$"; }
	stream << ",";
	if( m_DeltaTConstant ) { m_DeltaTConstant->getStepParameter( stream ); } else { stream << "$"; }
	stream << ",";
	if( m_DeltaTY ) { m_DeltaTY->getStepParameter( stream ); } else { stream << "$"; }
	stream << ",";
	if( m_DeltaTZ ) { m_DeltaTZ->getStepParameter( stream ); } else { stream << "$"; }
	stream << ");";
}
void IfcStructuralLoadTemperature::getStepParameter( std::stringstream& stream, bool ) const { stream << "#" << m_entity_id; }
const std::wstring IfcStructuralLoadTemperature::toString() const { return L"IfcStructuralLoadTemperature"; }
void IfcStructuralLoadTemperature::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 != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadTemperature, expecting 4, having " << num_args << ". Entity ID: " << m_entity_id << std::endl; throw BuildingException( err.str().c_str() ); }
	m_Name = IfcLabel::createObjectFromSTEP( args[0], map );
	m_DeltaTConstant = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[1], map );
	m_DeltaTY = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[2], map );
	m_DeltaTZ = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[3], map );
}
void IfcStructuralLoadTemperature::getAttributes( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes ) const
{
	IfcStructuralLoadStatic::getAttributes( vec_attributes );
	vec_attributes.emplace_back( std::make_pair( "DeltaTConstant", m_DeltaTConstant ) );
	vec_attributes.emplace_back( std::make_pair( "DeltaTY", m_DeltaTY ) );
	vec_attributes.emplace_back( std::make_pair( "DeltaTZ", m_DeltaTZ ) );
}
void IfcStructuralLoadTemperature::getAttributesInverse( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes_inverse ) const
{
	IfcStructuralLoadStatic::getAttributesInverse( vec_attributes_inverse );
}
void IfcStructuralLoadTemperature::setInverseCounterparts( shared_ptr<BuildingEntity> ptr_self_entity )
{
	IfcStructuralLoadStatic::setInverseCounterparts( ptr_self_entity );
}
void IfcStructuralLoadTemperature::unlinkFromInverseCounterparts()
{
	IfcStructuralLoadStatic::unlinkFromInverseCounterparts();
}
