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/IfcAxis2Placement3D.h"
  #include "ifcpp/IFC4/include/IfcCsgPrimitive3D.h"
  #include "ifcpp/IFC4/include/IfcPresentationLayerAssignment.h"
  #include "ifcpp/IFC4/include/IfcStyledItem.h"
  
  // ENTITY IfcCsgPrimitive3D 
  IfcCsgPrimitive3D::IfcCsgPrimitive3D() {}
  IfcCsgPrimitive3D::IfcCsgPrimitive3D( int id ) { m_entity_id = id; }
  IfcCsgPrimitive3D::~IfcCsgPrimitive3D() {}
  shared_ptr<BuildingObject> IfcCsgPrimitive3D::getDeepCopy( BuildingCopyOptions& options )
  {
  	shared_ptr<IfcCsgPrimitive3D> copy_self( new IfcCsgPrimitive3D() );
  	if( m_Position ) { copy_self->m_Position = dynamic_pointer_cast<IfcAxis2Placement3D>( m_Position->getDeepCopy(options) ); }
  	return copy_self;
  }
  void IfcCsgPrimitive3D::getStepLine( std::stringstream& stream ) const
  {
  	stream << "#" << m_entity_id << "= IFCCSGPRIMITIVE3D" << "(";
  	if( m_Position ) { stream << "#" << m_Position->m_entity_id; } else { stream << "$"; }
  	stream << ");";
  }
  void IfcCsgPrimitive3D::getStepParameter( std::stringstream& stream, bool ) const { stream << "#" << m_entity_id; }
  const std::wstring IfcCsgPrimitive3D::toString() const { return L"IfcCsgPrimitive3D"; }
  void IfcCsgPrimitive3D::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 != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCsgPrimitive3D, expecting 1, having " << num_args << ". Entity ID: " << m_entity_id << std::endl; throw BuildingException( err.str().c_str() ); }
  	readEntityReference( args[0], m_Position, map );
  }
  void IfcCsgPrimitive3D::getAttributes( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes )
  {
  	IfcGeometricRepresentationItem::getAttributes( vec_attributes );
  	vec_attributes.push_back( std::make_pair( "Position", m_Position ) );
  }
  void IfcCsgPrimitive3D::getAttributesInverse( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes_inverse )
  {
  	IfcGeometricRepresentationItem::getAttributesInverse( vec_attributes_inverse );
  }
  void IfcCsgPrimitive3D::setInverseCounterparts( shared_ptr<BuildingEntity> ptr_self_entity )
  {
  	IfcGeometricRepresentationItem::setInverseCounterparts( ptr_self_entity );
  }
  void IfcCsgPrimitive3D::unlinkFromInverseCounterparts()
  {
  	IfcGeometricRepresentationItem::unlinkFromInverseCounterparts();
  }
  