/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */

#include <sstream>
#include <limits>
#include <map>
#include "ifcpp/reader/ReaderUtil.h"
#include "ifcpp/writer/WriterUtil.h"
#include "ifcpp/model/BasicTypes.h"
#include "ifcpp/model/BuildingException.h"
#include "ifcpp/IFC4/include/IfcMeasureValue.h"
#include "ifcpp/IFC4/include/IfcComplexNumber.h"

// TYPE IfcComplexNumber = ARRAY [1:2] OF REAL;
IfcComplexNumber::~IfcComplexNumber() {}
shared_ptr<BuildingObject> IfcComplexNumber::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcComplexNumber> copy_self( new IfcComplexNumber() );
	for( size_t ii=0; ii<m_vec.size(); ++ii )
	{
		double item_ii = m_vec[ii];
		copy_self->m_vec.emplace_back( item_ii );
	}
	return copy_self;
}
void IfcComplexNumber::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCCOMPLEXNUMBER("; }
	writeNumericList( stream, m_vec );
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcComplexNumber::toString() const
{
	std::wstringstream strs;
	for( size_t ii = 0; ii < m_vec.size(); ++ii )				{					if( ii > 0 )					{						strs << L", ";					}					strs << m_vec[ii];				}			return strs.str(); 
}
shared_ptr<IfcComplexNumber> IfcComplexNumber::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcComplexNumber>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcComplexNumber>(); }
	shared_ptr<IfcComplexNumber> type_object( new IfcComplexNumber() );
	readRealList( arg, type_object->m_vec );
	return type_object;
}
