void IfcPerson::readStepData( std::vector<std::string>& args, const std::map<int,shared_ptr<IfcAlignmentP6Entity> >& map ) { const int num_args = (int)args.size(); if( num_args<8 ){ std::stringstream strserr; strserr << "Wrong parameter count for entity IfcPerson, expecting 8, having " << num_args << ". Object id: " << getId() << std::endl; throw IfcAlignmentP6Exception( strserr.str().c_str() ); } #ifdef _DEBUG if( num_args>8 ){ std::cout << "Wrong parameter count for entity IfcPerson, expecting 8, having " << num_args << ". Object id: " << getId() << std::endl; } #endif m_Identification = IfcIdentifier::readStepData( args[0] ); m_FamilyName = IfcLabel::readStepData( args[1] ); m_GivenName = IfcLabel::readStepData( args[2] ); readTypeList( args[3], m_MiddleNames ); readTypeList( args[4], m_PrefixTitles ); readTypeList( args[5], m_SuffixTitles ); readEntityReferenceList( args[6], m_Roles, map ); readEntityReferenceList( args[7], m_Addresses, map ); }
static int readWResDir( WResFileID handle, WResDir currdir, void *fileinfo ) { WResHeader head; WResExtHeader ext_head; int error; off_t seekpos; /* read the header and check that it is valid */ error = WResReadHeaderRecord( &head, handle ); if( !error ) { if( head.Magic[0] != WRESMAGIC0 || head.Magic[1] != WRESMAGIC1 ) { error = TRUE; WRES_ERROR( WRS_BAD_SIG ); } } if( !error ) { if( head.WResVer > WRESVERSION ) { error = TRUE; WRES_ERROR( WRS_BAD_VERSION ); } } if( !error ) { if( head.WResVer >= 1 ) { /* * seek to the extended header and read it */ seekpos = WRESSEEK( handle, sizeof( head ), SEEK_CUR ); error = (seekpos == -1L); if( error ) { WRES_ERROR( WRS_SEEK_FAILED ); } else { error = WResReadExtHeader( &ext_head, handle ); } } else { ext_head.TargetOS = WRES_OS_WIN16; } } /* set up the initial info for the directory and seek to it's start */ if( !error ) { currdir->NumResources = head.NumResources; currdir->NumTypes = head.NumTypes; currdir->TargetOS = ext_head.TargetOS; seekpos = (* WRESSEEK) ( handle, head.DirOffset, SEEK_SET ); if( seekpos == -1L ) { error = TRUE; WRES_ERROR( WRS_SEEK_FAILED ); } } /* read in the list of types (and the resources) */ if( !error ) { error = readTypeList( handle, currdir, head.WResVer, fileinfo ); } return( error ); } /* readWResDir */
void IfcSurfaceTexture::readStepData( std::vector<std::string>& args, const std::map<int,shared_ptr<Ifc4Entity> >& map ) { const int num_args = (int)args.size(); if( num_args<5 ){ std::stringstream strserr; strserr << "Wrong parameter count for entity IfcSurfaceTexture, expecting 5, having " << num_args << ". Object id: " << getId() << std::endl; throw Ifc4Exception( strserr.str().c_str() ); } #ifdef _DEBUG if( num_args>5 ){ std::cout << "Wrong parameter count for entity IfcSurfaceTexture, expecting 5, having " << num_args << ". Object id: " << getId() << std::endl; } #endif m_RepeatS = IfcBoolean::readStepData( args[0] ); m_RepeatT = IfcBoolean::readStepData( args[1] ); m_Mode = IfcIdentifier::readStepData( args[2] ); readEntityReference( args[3], m_TextureTransform, map ); readTypeList( args[4], m_Parameter ); }
void IfcSurfaceTexture::readStepArguments( const std::vector<std::string>& args, const std::map<int,shared_ptr<IfcPPEntity> >& map ) { const int num_args = (int)args.size(); if( num_args<5 ){ std::stringstream strserr; strserr << "Wrong parameter count for entity IfcSurfaceTexture, expecting 5, having " << num_args << ". Object id: " << getId() << std::endl; throw IfcPPException( strserr.str().c_str() ); } #ifdef _DEBUG if( num_args>5 ){ std::cout << "Wrong parameter count for entity IfcSurfaceTexture, expecting 5, having " << num_args << ". Object id: " << getId() << std::endl; } #endif if( _stricmp( args[0].c_str(), ".F." ) == 0 ) { m_RepeatS = false; } else if( _stricmp( args[0].c_str(), ".T." ) == 0 ) { m_RepeatS = true; } if( _stricmp( args[1].c_str(), ".F." ) == 0 ) { m_RepeatT = false; } else if( _stricmp( args[1].c_str(), ".T." ) == 0 ) { m_RepeatT = true; } m_Mode = IfcIdentifier::createObjectFromStepData( args[2] ); readEntityReference( args[3], m_TextureTransform, map ); readTypeList( args[4], m_Parameter ); }
void IfcClassification::readStepData( std::vector<std::string>& args, const std::map<int,shared_ptr<IfcBridgeEntity> >& map ) { const int num_args = (int)args.size(); if( num_args<7 ){ std::stringstream strserr; strserr << "Wrong parameter count for entity IfcClassification, expecting 7, having " << num_args << ". Object id: " << getId() << std::endl; throw IfcBridgeException( strserr.str().c_str() ); } #ifdef _DEBUG if( num_args>7 ){ std::cout << "Wrong parameter count for entity IfcClassification, expecting 7, having " << num_args << ". Object id: " << getId() << std::endl; } #endif m_Source = IfcLabel::readStepData( args[0] ); m_Edition = IfcLabel::readStepData( args[1] ); m_EditionDate = IfcDate::readStepData( args[2] ); m_Name = IfcLabel::readStepData( args[3] ); m_Description = IfcText::readStepData( args[4] ); m_Location = IfcURIReference::readStepData( args[5] ); readTypeList( args[6], m_ReferenceTokens ); }
void IfcPostalAddress::readStepData( std::vector<std::string>& args, const std::map<int,shared_ptr<IfcTunnelEntity> >& map ) { const int num_args = (int)args.size(); if( num_args<10 ){ std::stringstream strserr; strserr << "Wrong parameter count for entity IfcPostalAddress, expecting 10, having " << num_args << ". Object id: " << getId() << std::endl; throw IfcTunnelException( strserr.str().c_str() ); } #ifdef _DEBUG if( num_args>10 ){ std::cout << "Wrong parameter count for entity IfcPostalAddress, expecting 10, having " << num_args << ". Object id: " << getId() << std::endl; } #endif m_Purpose = IfcAddressTypeEnum::readStepData( args[0] ); m_Description = IfcText::readStepData( args[1] ); m_UserDefinedPurpose = IfcLabel::readStepData( args[2] ); m_InternalLocation = IfcLabel::readStepData( args[3] ); readTypeList( args[4], m_AddressLines ); m_PostalBox = IfcLabel::readStepData( args[5] ); m_Town = IfcLabel::readStepData( args[6] ); m_Region = IfcLabel::readStepData( args[7] ); m_PostalCode = IfcLabel::readStepData( args[8] ); m_Country = IfcLabel::readStepData( args[9] ); }
void IfcStructuralSurfaceMemberVarying::readStepData( std::vector<std::string>& args, const std::map<int,shared_ptr<Ifc2x3Entity> >& map ) { const int num_args = (int)args.size(); if( num_args<11 ){ std::stringstream strserr; strserr << "Wrong parameter count for entity IfcStructuralSurfaceMemberVarying, expecting 11, having " << num_args << ". Object id: " << getId() << std::endl; throw Ifc2x3Exception( strserr.str().c_str() ); } #ifdef _DEBUG if( num_args>11 ){ std::cout << "Wrong parameter count for entity IfcStructuralSurfaceMemberVarying, expecting 11, having " << num_args << ". Object id: " << getId() << std::endl; } #endif m_GlobalId = IfcGloballyUniqueId::readStepData( args[0] ); readEntityReference( args[1], m_OwnerHistory, map ); m_Name = IfcLabel::readStepData( args[2] ); m_Description = IfcText::readStepData( args[3] ); m_ObjectType = IfcLabel::readStepData( args[4] ); readEntityReference( args[5], m_ObjectPlacement, map ); readEntityReference( args[6], m_Representation, map ); m_PredefinedType = IfcStructuralSurfaceTypeEnum::readStepData( args[7] ); m_Thickness = IfcPositiveLengthMeasure::readStepData( args[8] ); readTypeList( args[9], m_SubsequentThickness ); readEntityReference( args[10], m_VaryingThicknessLocation, map ); }