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

// ENTITY IfcBoundaryFaceCondition 
IfcBoundaryFaceCondition::IfcBoundaryFaceCondition( int id ) { m_entity_id = id; }
IfcBoundaryFaceCondition::~IfcBoundaryFaceCondition() {}
shared_ptr<BuildingObject> IfcBoundaryFaceCondition::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcBoundaryFaceCondition> copy_self( new IfcBoundaryFaceCondition() );
	if( m_Name ) { copy_self->m_Name = dynamic_pointer_cast<IfcLabel>( m_Name->getDeepCopy(options) ); }
	if( m_TranslationalStiffnessByAreaX ) { copy_self->m_TranslationalStiffnessByAreaX = dynamic_pointer_cast<IfcModulusOfSubgradeReactionSelect>( m_TranslationalStiffnessByAreaX->getDeepCopy(options) ); }
	if( m_TranslationalStiffnessByAreaY ) { copy_self->m_TranslationalStiffnessByAreaY = dynamic_pointer_cast<IfcModulusOfSubgradeReactionSelect>( m_TranslationalStiffnessByAreaY->getDeepCopy(options) ); }
	if( m_TranslationalStiffnessByAreaZ ) { copy_self->m_TranslationalStiffnessByAreaZ = dynamic_pointer_cast<IfcModulusOfSubgradeReactionSelect>( m_TranslationalStiffnessByAreaZ->getDeepCopy(options) ); }
	return copy_self;
}
void IfcBoundaryFaceCondition::getStepLine( std::stringstream& stream ) const
{
	stream << "#" << m_entity_id << "= IFCBOUNDARYFACECONDITION" << "(";
	if( m_Name ) { m_Name->getStepParameter( stream ); } else { stream << "$"; }
	stream << ",";
	if( m_TranslationalStiffnessByAreaX ) { m_TranslationalStiffnessByAreaX->getStepParameter( stream, true ); } else { stream << "$" ; }
	stream << ",";
	if( m_TranslationalStiffnessByAreaY ) { m_TranslationalStiffnessByAreaY->getStepParameter( stream, true ); } else { stream << "$" ; }
	stream << ",";
	if( m_TranslationalStiffnessByAreaZ ) { m_TranslationalStiffnessByAreaZ->getStepParameter( stream, true ); } else { stream << "$" ; }
	stream << ");";
}
void IfcBoundaryFaceCondition::getStepParameter( std::stringstream& stream, bool ) const { stream << "#" << m_entity_id; }
const std::wstring IfcBoundaryFaceCondition::toString() const { return L"IfcBoundaryFaceCondition"; }
void IfcBoundaryFaceCondition::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 IfcBoundaryFaceCondition, 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_TranslationalStiffnessByAreaX = IfcModulusOfSubgradeReactionSelect::createObjectFromSTEP( args[1], map );
	m_TranslationalStiffnessByAreaY = IfcModulusOfSubgradeReactionSelect::createObjectFromSTEP( args[2], map );
	m_TranslationalStiffnessByAreaZ = IfcModulusOfSubgradeReactionSelect::createObjectFromSTEP( args[3], map );
}
void IfcBoundaryFaceCondition::getAttributes( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes ) const
{
	IfcBoundaryCondition::getAttributes( vec_attributes );
	vec_attributes.emplace_back( std::make_pair( "TranslationalStiffnessByAreaX", m_TranslationalStiffnessByAreaX ) );
	vec_attributes.emplace_back( std::make_pair( "TranslationalStiffnessByAreaY", m_TranslationalStiffnessByAreaY ) );
	vec_attributes.emplace_back( std::make_pair( "TranslationalStiffnessByAreaZ", m_TranslationalStiffnessByAreaZ ) );
}
void IfcBoundaryFaceCondition::getAttributesInverse( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes_inverse ) const
{
	IfcBoundaryCondition::getAttributesInverse( vec_attributes_inverse );
}
void IfcBoundaryFaceCondition::setInverseCounterparts( shared_ptr<BuildingEntity> ptr_self_entity )
{
	IfcBoundaryCondition::setInverseCounterparts( ptr_self_entity );
}
void IfcBoundaryFaceCondition::unlinkFromInverseCounterparts()
{
	IfcBoundaryCondition::unlinkFromInverseCounterparts();
}
