void Mesh::printInStream(std::ofstream &file) { file << points.size() << std::endl; for(int i=0;i<points.size();i++){ file << points[i].getString() << std::endl; } file << this->edges.size() << std::endl; for(auto e: this->edges.getMap()){ IndexSegment edge = e.first; file << edge.getString() << std::endl; } writeElements(file); }
void PartitionIO<MeshType>::write (const meshPartsPtr_Type& meshParts) { M_meshPartsOut = meshParts; M_numParts = M_meshPartsOut->size(); M_HDF5IO.openFile (M_fileName, M_comm, false); writeStats(); writePoints(); writeEdges(); writeFaces(); writeElements(); M_HDF5IO.closeFile(); M_meshPartsOut.reset(); }
/***************************************************** ** ** GenericTableWriter --- createTable ** ******************************************************/ Table *GenericTableWriter::createTable( Tc *conf ) { tcfg = conf; uint i, j; // calculate number of cols and rows uint cols = 0; uint rows = 0; for( i = 0; i < tcfg->colsets.size(); i++ ) { rows = Max( rows, calcRowCount( tcfg->colsets[i] ) + 1 ); for( j = 0; j < tcfg->colsets[i].cols.size(); j++ ) { cols += getNumCols4ColumnType( tcfg->colsets[i], tcfg->colsets[i].cols[j].type ); } } if ( cols == 0 ) { wxLogError( wxT( "ERROR: table has no cols" )); assert( false ); } wxLogDebug( wxString::Format( wxT( "Create table cols %u rows %u" ), cols, rows )); table = new Table( cols, rows ); //for( uint i = 0; i < cols; i++ ) for( uint j = 0; j < rows; j++ ) table->setEntry( i, j, wxT( "a" )); uint currentcol = 0; for( i = 0; i < tcfg->colsets.size(); i++ ) { calcObjectList( tcfg->colsets[i] ); for( j = 0; j < tcfg->colsets[i].cols.size(); j++ ) { switch( tcfg->colsets[i].cols[j].type ) { case TAB_CT_NONE: break; case TAB_CT_CUSTOM_KEY_VALUE: //printf( "HEADER tcfg->colsets[i].cols[j]size %ld rows %u\n", tcfg->colsets[i].cols[j].cells.size(), rows ); writeCustomKeyValueList( currentcol, tcfg->colsets[i].cols[j] ); break; case TAB_CT_OBJECT_NAME: writeObjectName( currentcol, tcfg->colsets[i] ); break; case TAB_CT_LONGITUDE: writeObjectLongitude( currentcol, tcfg->colsets[i] ); break; case TAB_CT_LATITUDE: writeObjectLatitude( currentcol, tcfg->colsets[i] ); break; case TAB_CT_NAME_LONGITUDE: writeObjectNameAndLongitude( currentcol, tcfg->colsets[i] ); break; case TAB_CT_90_DEGREE_LONGITUDE: write90DegreeLongitude( currentcol, tcfg->colsets[i] ); break; case TAB_CT_45_DEGREE_LONGITUDE: write45DegreeLongitude( currentcol, tcfg->colsets[i] ); break; case TAB_CT_ANTISCIA: writeAntiscia( currentcol, tcfg->colsets[i] ); break; case TAB_CT_SIGN_LORD: writeSignLords( currentcol, tcfg->colsets[i] ); break; case TAB_CT_DIGNITY: writeDignities( currentcol, tcfg->colsets[i] ); break; case TAB_CT_NAVAMSA: writeNavamsa( currentcol, tcfg->colsets[i] ); break; case TAB_CT_NAKSHATRA: writeNakshatras( currentcol, tcfg->colsets[i] ); break; case TAB_CT_NAKSHATRA_PADA: writeNakshatraPadas( currentcol, tcfg->colsets[i] ); break; case TAB_CT_KP_LORDS: writeKpLords( currentcol, tcfg->colsets[i] ); break; case TAB_CT_SHASTIAMSA_LORD: writeShastiamsaLords( currentcol, tcfg->colsets[i] ); break; case TAB_CT_DASA_VARGA: writeDasaVarga( currentcol, tcfg->colsets[i] ); break; case TAB_CT_HOUSE_POSITION: writeBhavaPositions( currentcol, tcfg->colsets[i] ); break; case TAB_CT_CHARA_KARAKA: writeCharaKarakas( currentcol, tcfg->colsets[i] ); break; case TAB_CT_AV_REKHAPOINTS: writeAvRekhaPoints( currentcol, tcfg->colsets[i] ); break; case TAB_CT_ELEMENT: writeElements( currentcol, tcfg->colsets[i] ); break; case TAB_CT_SIGNIFICATION: writeSignification( currentcol, tcfg->colsets[i] ); break; case TAB_CT_SIGN_QUALITY: writeSignQualities( currentcol, tcfg->colsets[i] ); break; case TAB_CT_WESTERN_ASPECTARIUM: writeAspectarium( currentcol, tcfg->colsets[i] ); break; case TAB_CT_ERROR: writeErrorColumn( currentcol, tcfg->colsets[i].cols[j] ); break; case TAB_CT_EMPTY: //printf( "TODO EMPTY COL\n" ); break; default: assert( false ); break; } currentcol += getNumCols4ColumnType( tcfg->colsets[i], tcfg->colsets[i].cols[j].type ); } } return table; }
void Account::save(QXmlStreamWriter *xml) { QXmlStreamAttributes attr; writeAttributes(&attr); xml->writeAttributes(attr); writeElements(xml); }
void AMF0Object::write() { bs.putU8(AMF0_TYPE_OBJECT); writeElements(); }