这篇教程C++ writeStream函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中writeStream函数的典型用法代码示例。如果您正苦于以下问题:C++ writeStream函数的具体用法?C++ writeStream怎么用?C++ writeStream使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了writeStream函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: TestPageStreamvoid TestPageStream(){ CommonLib::simple_alloc_t alloc; embDB::CStorage storage(&alloc, 1000); storage.AddRef(); storage.open(L"d://db//pagestorage.data", false, false, true, false); embDB::FilePagePtr pPage = storage.getNewPage(PAGE_SIZE_8K); storage.initStorage(pPage->getAddr()); storage.saveStorageInfo(); bool bCheckCRC = false; short nType1 = 1; short nType2 = 2; int64 nAddr = storage.getNewPageAddr(PAGE_SIZE_8K); { embDB::TWriteStreamPage<embDB::IDBStorage> writeStream(&storage, PAGE_SIZE_8K, bCheckCRC, nType1, nType2); writeStream.open(nAddr, 0); for (int64 i = 0; i < 10000; ++i) { writeStream.write(i); } writeStream.Save(); } { embDB::TWriteStreamPage<embDB::IDBStorage> writeStream(&storage, PAGE_SIZE_8K, bCheckCRC, nType1, nType2); writeStream.open(nAddr, 0, true); for (int64 i = 0; i <100000; ++i) { writeStream.write(i); } writeStream.Save(); } { embDB::TReadStreamPage<embDB::IDBStorage> readStream(&storage, PAGE_SIZE_8K, bCheckCRC, nType1, nType2); readStream.open(nAddr, 0); for (int64 i = 0; i < 20000; ++i) { int64 d = readStream.readInt64(); if (d != i) { d++; assert(false); } } }}
开发者ID:ViacheslavN,项目名称:GIS,代码行数:57,
示例2: assertvoid SettingsSerializer::writePackedVariant(QDataStream& stream, const QVariant& v){ assert(v.canConvert(QVariant::String)); QString str = v.toString(); if (str == "true") writeStream(stream, QString("1")); else if (str == "false") writeStream(stream, QString("0")); else writeStream(stream, str.toUtf8());}
开发者ID:CuiZhicheng,项目名称:qTox,代码行数:11,
示例3: XOJ_CHECK_TYPEvoid PdfExport::writeGzStream(Stream* str, GList* replacementList){ XOJ_CHECK_TYPE(PdfExport); Object obj1; str->getDict()->lookup("Length", &obj1); if (!obj1.isInt()) { g_error("PDFDoc::writeGzStream, no Length in stream dict"); return; } const int length = obj1.getInt(); obj1.free(); char* buffer = new char[length]; str->unfilteredReset(); for (int i = 0; i < length; i++) { int c = str->getUnfilteredChar(); buffer[i] = c; } GString* text = GzHelper::gzuncompress(buffer, length); writeStream(text->str, text->len, replacementList); g_string_free(text, true); delete buffer; str->reset();}
开发者ID:cass00,项目名称:xournalpp,代码行数:32,
示例4: FTRACE// -----------------------------------------------------------------------------// CCommonTestClass::ExternalizeMPXCollectionTypeL()// Returns: Symbian OS errors.// -----------------------------------------------------------------------------TInt CCommonTestClass::ExternalizeMPXCollectionTypeL() { FTRACE(FPrint(_L("CCommonTestClass::ExternalizeMPXCollectionTypeL testing CMPXCollectionType::ExternalizeMPXCollectionTypeL begin"))); iLog->Log(_L("CCommonTestClass::ExternalizeMPXCollectionTypeL testing CMPXCollectionType::ExternalizeMPXCollectionTypeL begin")); TInt err = KErrNone; if ( iType != NULL ) { FTRACE(FPrint(_L("CCommonTestClass::ExternalizeMPXCollectionTypeL started Externalize"))); iLog->Log(_L("CCommonTestClass::ExternalizeMPXCollectionTypeL started Externalize")); CBufBase* buffer = CBufFlat::NewL( 50 ); CleanupStack::PushL( buffer ); RBufWriteStream writeStream( *buffer ); CleanupClosePushL( writeStream ); iType->ExternalizeL( writeStream ); writeStream.CommitL(); buffer->Compress(); CleanupStack::PopAndDestroy( &writeStream ); CleanupStack::PopAndDestroy( buffer ); } else { err = KErrBadTestParameter; FTRACE(FPrint(_L("CCommonTestClass::ExternalizeMPXCollectionTypeL Stif test script is wrong."))); iLog->Log(_L("CCommonTestClass::ExternalizeMPXCollectionTypeL Stif test script is wrong.")); } FTRACE(FPrint(_L("CCommonTestClass::ExternalizeMPXCollectionTypeL testing CMPXCollectionType::ExternalizeMPXCollectionTypeL end err=%d"), err)); iLog->Log(_L("CCommonTestClass::ExternalizeMPXCollectionTypeL testing CMPXCollectionType::ExternalizeMPXCollectionTypeL end err=%d"), err); return err; }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:33,
示例5: SSMLOGLEAVEIFNULLvoid CCmdTestList::AddMultipleWaitCommandL(TInt32 aTimeout) { RDebug::Printf("CCmdTestList::AddMultipleWaitCommandL"); SSMLOGLEAVEIFNULL(iCommandList); // const TInt KTempDataLength = 1024; CBufFlat* inputBuffer = CBufFlat::NewL(KTempDataLength); CleanupStack::PushL(inputBuffer); RBufWriteStream writeStream(*inputBuffer); CleanupClosePushL(writeStream); writeStream.WriteInt32L(aTimeout);#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE writeStream.WriteUint16L(KDefaultCommandPriority);#endif //SYMBIAN_SSM_FLEXIBLE_MERGE writeStream.CommitL(); RDesReadStream readStream(inputBuffer->Ptr(0)); CleanupClosePushL(readStream); TArray<MSsmCommand*> deferredList = iDeferredList.Array(); CSsmCommandBase* cmd = CCmdMultipleWait::NewL(readStream, deferredList); CleanupStack::PushL(cmd); static_cast<MSsmCommandList&>(*iCommandList).AppendL(cmd); iDeferredList.Reset(); CleanupStack::Pop(cmd); CleanupStack::PopAndDestroy(&readStream); CleanupStack::PopAndDestroy(&writeStream); CleanupStack::PopAndDestroy(inputBuffer); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:28,
示例6: outputNormvoidConsole::output(){ // Print Non-linear Residual if (onNonlinearResidual()) { if (_write_screen) Moose::out << std::setw(2) << _nonlinear_iter << " Nonlinear |R| = " << outputNorm(_old_nonlinear_norm, _norm) << std::endl; if (_write_file) _file_output_stream << std::setw(2) << _nonlinear_iter << " Nonlinear |R| = " << std::scientific << _norm << std::endl; } // Print Linear Residual else if (onLinearResidual()) { if (_write_screen) Moose::out << std::setw(7) << _linear_iter << " Linear |R| = " << std::scientific << outputNorm(_old_linear_norm, _norm) << std::endl; if (_write_file) _file_output_stream << std::setw(7) << _linear_iter << std::scientific << " Linear |R| = " << std::scientific << _norm << std::endl; } // Call the base class output function else { writeVariableNorms(); TableOutputter::output(); } // Write the file if (_write_file) writeStream();}
开发者ID:joshua-cogliati-inl,项目名称:moose,代码行数:34,
示例7: writeStream/**Helper function to compare the data of the command.*/void CCmdTestWaitForApparcInit::CompareCommandsDataL(CCmdWaitForApparcInit* aTestCmd, TCmdErrorSeverity aSeverity, const TUint16 aPriority) { // create output buffer and stream CBufFlat* outputBuffer = CBufFlat::NewL(KTempDataLength); CleanupStack::PushL(outputBuffer); RBufWriteStream writeStream(*outputBuffer); CleanupClosePushL(writeStream); // externalise the data aTestCmd->ExternalizeL(writeStream); RDesReadStream readStream(outputBuffer->Ptr(0)); CleanupClosePushL(readStream); TCmdErrorSeverity severity = static_cast<TCmdErrorSeverity>(readStream.ReadInt16L()); TEST(aSeverity == severity);#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE TUint16 priority = readStream.ReadUint16L(); TEST(aPriority == priority);#else TEST(aPriority == KDefaultPriority);#endif CleanupStack::PopAndDestroy(&readStream); CleanupStack::PopAndDestroy(&writeStream); CleanupStack::PopAndDestroy(outputBuffer); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:28,
示例8: GTEST_TEST_FGTEST_TEST_F(ConfigManager, newSave) { ConfigMan.create(); ConfigMan.setInt("width", 640); ConfigMan.setInt("height", 480); const Common::UString game1 = ConfigMan.createGame("/path/to/game1/"); ConfigMan.setGame(game1); ConfigMan.setString("path", "/path/to/game1/"); ConfigMan.setInt("width", 800); ConfigMan.setInt("height", 600); ConfigMan.setBool("fullscreen", true); const Common::UString game2 = ConfigMan.createGame("/path/to/game2/"); ConfigMan.setGame(game2); ConfigMan.setString("path", "/path/to/game2"); Common::MemoryWriteStreamDynamic writeStream(true); ConfigMan.save(writeStream); compareStream(writeStream, kConfigFile);}
开发者ID:Supermanu,项目名称:xoreos,代码行数:26,
示例9: writeStreamConsole::~Console(){ // Write the libMesh performance log header if (_perf_header) { if (_write_screen && !_timing) Moose::out << Moose::perf_log.get_info_header(); if (_write_file) _file_output_stream << Moose::perf_log.get_info_header(); } // Write the solve log (Moose Test Performance) if (_solve_log) { if (_write_screen && !_timing) Moose::out << Moose::perf_log.get_perf_info(); if (_write_file) _file_output_stream << Moose::perf_log.get_perf_info(); } // Write the setup log (Setup Performance) if (_setup_log) { if (_write_screen && !_timing) Moose::out << Moose::setup_perf_log.get_perf_info(); if (_write_file) _file_output_stream << Moose::setup_perf_log.get_perf_info(); } // Write the libMesh log#ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING if (_libmesh_log) { if (_write_screen && !_timing) Moose::out << libMesh::perflog.get_perf_info(); if (_write_file) _file_output_stream << libMesh::perflog.get_perf_info(); }#endif // Write the file output stream if (_write_file) writeStream(); /* If --timing was not used disable the logging b/c the destructor of these * object does the output, if --timing was used do nothing because all other * screen related output was disabled above */ if (!_timing) { /* Disable the logs, without this the logs will be printed during the destructors of the logs themselves */ Moose::perf_log.disable_logging(); Moose::setup_perf_log.disable_logging();#ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING libMesh::perflog.disable_logging();#endif }}
开发者ID:joshua-cogliati-inl,项目名称:moose,代码行数:59,
示例10: writeStreambool SkBBoxHierarchyRecord::shouldRewind(void* data) { // SkBBoxHierarchy::rewindInserts is called by SkPicture after the // SkPicture has rewound its command stream. To match that rewind in the // BBH, we rewind all draws that reference commands that were recorded // past the point to which the SkPicture has rewound, which is given by // writeStream().bytesWritten(). SkPictureStateTree::Draw* draw = static_cast<SkPictureStateTree::Draw*>(data); return draw->fOffset >= writeStream().bytesWritten();}
开发者ID:Tkkg1994,项目名称:Platfrom-kccat6,代码行数:9,
示例11: TableOutputterConsole::Console(const std::string & name, InputParameters parameters) : TableOutputter(name, parameters), _max_rows(getParam<unsigned int>("max_rows")), _fit_mode(getParam<MooseEnum>("fit_mode")), _use_color(false), _scientific_time(getParam<bool>("scientific_time")), _write_file(getParam<bool>("output_file")), _write_screen(getParam<bool>("output_screen")), _verbose(getParam<bool>("verbose")), _old_linear_norm(std::numeric_limits<Real>::max()), _old_nonlinear_norm(std::numeric_limits<Real>::max()), _perf_log(getParam<bool>("perf_log")), _solve_log(isParamValid("solve_log") ? getParam<bool>("solve_log") : _perf_log), _setup_log(isParamValid("setup_log") ? getParam<bool>("setup_log") : _perf_log),#ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING _libmesh_log(getParam<bool>("libmesh_log")),#endif _setup_log_early(getParam<bool>("setup_log_early")), _perf_header(isParamValid("perf_header") ? getParam<bool>("perf_header") : _perf_log), _all_variable_norms(getParam<bool>("all_variable_norms")), _outlier_variable_norms(getParam<bool>("outlier_variable_norms")), _outlier_multiplier(getParam<std::vector<Real> >("outlier_multiplier")), _timing(_app.getParam<bool>("timing")){ // If --timing was used from the command-line, do nothing, all logs are enabled if (!_timing) { // Disable performance logging (all log input options must be false) if (!_perf_log && !_setup_log && !_solve_log && !_perf_header && !_setup_log_early) { Moose::perf_log.disable_logging(); Moose::setup_perf_log.disable_logging(); } // Disable libMesh log#ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING if (!_libmesh_log) libMesh::perflog.disable_logging();#endif } // Set output coloring if (getParam<bool>("use_color")) { char * term_env = getenv("TERM"); if (term_env) { std::string term(term_env); if (term == "xterm-256color" || term == "xterm") _use_color = true; } } // If file output is desired, wipe out the existing file if not recovering if (_write_file && !_app.isRecovering()) writeStream(false);}
开发者ID:atomica,项目名称:moose,代码行数:57,
示例12: bufPtrHBufC8* RContactRemoteView::PackageSortOrderLC(const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes) const { TInt bufLength=aSortOrder.ExternalizedSize(); bufLength+=sizeof(TContactViewPreferences);// HBufC8* buf=HBufC8::NewLC(bufLength); TPtr8 bufPtr(buf->Des()); RDesWriteStream writeStream(bufPtr); writeStream << (TInt32&)aContactTypes; writeStream << aSortOrder; bufPtr.SetLength(bufLength); return buf; }
开发者ID:KDE,项目名称:android-qt-mobility,代码行数:12,
示例13: EUNIT_PRINTvoid CNSmlDummyDataProvider_Test::DoStoreFormatLL() { const CSmlDataStoreFormat& storeFormat = iCNSmlDummyDataProvider->DoStoreFormatL(); EUNIT_PRINT( storeFormat.DisplayName() ); EUNIT_PRINT( _L("Property count %d"), storeFormat.FolderPropertyCount() ); CBufFlat* store = CBufFlat::NewL( 512 ); CleanupStack::PushL( store ); RBufWriteStream writeStream(*store, 0); CleanupClosePushL( writeStream ); storeFormat.ExternalizeL( writeStream ); CleanupStack::PopAndDestroy( 2, store ); }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:12,
示例14: args/**Searches all contact items in the view for fields that contain the searchstrings specified. @capability ReadUserData@param aFindWords A descriptor array containing one or more search strings@param aMatchedContacts On return, an array of matching contact items@param find behaviour configuration uid to be passed to the server. */void RContactRemoteView::ContactsMatchingCriteriaL(const MDesCArray& aFindWords, RPointerArray<CViewContact>& aMatchedContacts, TBool aPrefixSearch,TUid aUid) { if(aUid != KNullUid) { TIpcArgs args(aUid.iUid); User::LeaveIfError(SendReceive(ECntSendPluginUidToServer,args)); } CBufBase* buffer = CBufFlat::NewL(32); CleanupStack::PushL(buffer); RBufWriteStream writeStream(*buffer); CleanupClosePushL(writeStream); writeStream.WriteUint32L(aPrefixSearch); const TInt count = aFindWords.MdcaCount(); writeStream.WriteUint32L(count); for (TInt i=0; i<count; ++i) { TPtrC ptr = aFindWords.MdcaPoint(i); writeStream.WriteUint32L(ptr.Length()); writeStream << ptr; } writeStream.CommitL(); CleanupStack::PopAndDestroy(&writeStream); //writeStream.Close() TPtr8 ptr(buffer->Ptr(0)); const TInt bufferSize = buffer->Size(); TPckg<TInt> size(bufferSize); TPckgBuf<TInt> pckg; TIpcArgs args(&pckg,&size,&ptr); User::LeaveIfError(SendReceive(ECntContactMatchingCriteriaExternalizedSize,args)); CleanupStack::PopAndDestroy(buffer); //Internalize Contacts HBufC8* buf=HBufC8::NewLC(pckg()); TPtr8 contactsbufPtr(buf->Des()); TIpcArgs args2(&contactsbufPtr); User::LeaveIfError(SendReceive(ECntGetContactMatchingCriteria,args2)); RDesReadStream readStream(contactsbufPtr); CleanupClosePushL(readStream); const TInt findCount = readStream.ReadUint32L(); for (TInt zz=0;zz<findCount;++zz) { CViewContact* thisContact = CViewContact::NewLC(KNullContactId); readStream >> *thisContact; aMatchedContacts.AppendL(thisContact); CleanupStack::Pop(thisContact); } CleanupStack::PopAndDestroy(2, buf); }
开发者ID:KDE,项目名称:android-qt-mobility,代码行数:61,
示例15: imageSizebool ossimOpjJp2Writer::writeFile(){ // This method is called from ossimImageFileWriter::execute(). bool result = false; if( theInputConnection.valid() && (getErrorStatus() == ossimErrorCodes::OSSIM_OK) ) { // Make sure Area of Interest is an even multiple of tiles ossimIrect areaOfInterest = theInputConnection->getAreaOfInterest(); ossimIpt imageSize(areaOfInterest.size()); ossimIpt imageLr(areaOfInterest.lr()); ossim_uint32 xBoundaryAdjustFactor = DEFAULT_TILE_SIZE.x - (imageSize.x % DEFAULT_TILE_SIZE.x); ossim_uint32 yBoundaryAdjustFactor = DEFAULT_TILE_SIZE.y - (imageSize.y % DEFAULT_TILE_SIZE.y); imageLr.x += xBoundaryAdjustFactor; imageLr.y += yBoundaryAdjustFactor; areaOfInterest.set_lr(imageLr); theInputConnection->setAreaOfInterest(areaOfInterest); // Set the tile size for all processes. theInputConnection->setTileSize( DEFAULT_TILE_SIZE ); theInputConnection->setToStartOfSequence(); //--- // Note only the master process used for writing... //--- if(theInputConnection->isMaster()) { if (!isOpen()) { open(); } if ( isOpen() ) { result = writeStream(); } } else // Slave process. { // This will return after all tiles for this node have been processed. theInputConnection->slaveProcessTiles(); result = true; } } return result; } // End: ossimOpjJp2Writer::writeFile()
开发者ID:geoware,项目名称:ossim-plugins,代码行数:52,
示例16: writeStreamfbtBinTables* fbtBuilder::write(void){ fbtMemoryStream ms; ms.open(fbtStream::SM_WRITE); m_writeMode = -1; writeStream(&ms); void* buffer = fbtMalloc(ms.size() + 1); fbtMemcpy(buffer, ms.ptr(), ms.size()); return new fbtBinTables(buffer, ms.size());}
开发者ID:Draion,项目名称:Gamekit,代码行数:13,
示例17: writeStream/** Construct and delete a command using Internalise*/ void CCmdTestLoadSup::CallInternalizeDataTestL(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TInt16 aRetries, const TSsmSupInfo& aInfo, const TUint16 aPriority) { // create a set of data and put it into a buffer CBufFlat* bufferin = CBufFlat::NewL(1024); CleanupStack::PushL(bufferin); // create write stream on buffer and put the data in RBufWriteStream writeStream(*bufferin); CleanupClosePushL(writeStream); writeStream.WriteInt16L(aSeverity); writeStream.WriteInt8L(aExecutionBehaviour); aInfo.ExternalizeL(writeStream); writeStream.WriteInt16L(aRetries);#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE writeStream.WriteUint16L(aPriority);#else TEST(aPriority == KDefaultPriority);#endif writeStream.CommitL(); // create a readstream on the data and put the data into the command RDesReadStream aReadStream(bufferin->Ptr(0)); CleanupClosePushL(aReadStream); CCmdLoadSup* loadSupCmd = CCmdLoadSup::NewL(aReadStream); CleanupStack::PushL(loadSupCmd); TEST(loadSupCmd->Type() == ESsmCmdLoadSup); // create output buffer and stream CBufFlat* bufferout = CBufFlat::NewL(1024); CleanupStack::PushL(bufferout); RBufWriteStream writeStream2(*bufferout); CleanupClosePushL(writeStream2); // externalise the data loadSupCmd->ExternalizeL(writeStream2); // check the data is correct#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE CompareInputAndOutputL(aSeverity, aExecutionBehaviour, aRetries, aInfo, bufferout, aPriority);#else CompareInputAndOutputL(aSeverity, aExecutionBehaviour, aRetries, aInfo, bufferout);#endif CleanupStack::PopAndDestroy(&writeStream2); CleanupStack::PopAndDestroy(bufferout); CleanupStack::PopAndDestroy(loadSupCmd); CleanupStack::PopAndDestroy(&aReadStream); CleanupStack::PopAndDestroy(&writeStream); CleanupStack::PopAndDestroy(bufferin); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:54,
示例18: CHECK_PTRbool SGFParser::exportSGFtoClipB(QString *str, Tree *tree){ CHECK_PTR(tree); if (stream != NULL) delete stream; stream = new QTextStream(str, IO_WriteOnly); bool res = writeStream(tree); delete stream; stream = NULL; return res;}
开发者ID:rd8,项目名称:qGo,代码行数:14,
示例19: Q_CHECK_PTR/* * takes a game tree, and puts it in SGF format */bool SGFParser::exportSGFtoClipB(QString *str, Tree *tree, GameData *gd){ Q_CHECK_PTR(tree); if (stream != NULL) delete stream; stream = new QTextStream(str, QIODevice::WriteOnly); bool res = writeStream(tree,gd); delete stream; stream = NULL; return res;}
开发者ID:EPeillard,项目名称:qgo,代码行数:17,
示例20: QFETCHvoid tst_QWidgetsVariant::writeToReadFromDataStream(){ QFETCH( QVariant, writeVariant ); QFETCH( bool, isNull ); QByteArray data; QDataStream writeStream( &data, QIODevice::WriteOnly ); writeStream << writeVariant; QVariant readVariant; QDataStream readStream( &data, QIODevice::ReadOnly ); readStream >> readVariant; QVERIFY( readVariant.isNull() == isNull );}
开发者ID:KDE,项目名称:android-qt5-qtbase,代码行数:14,
示例21: INFO_PRINTF1void CCmdTestLoadSup::doTestResourceReaderWithGoodDataL() { TInt err = KErrNone; TInt expectedErr = KErrNone; // these values must match what is in the resource file TCmdErrorSeverity severity = ECmdCriticalSeverity; TSsmExecutionBehaviour executionBehaviour = ESsmWaitForSignal; TUid uid; uid.iUid = 0; TInt32 ordinal = 1; TInt16 retries = 5; TSsmSupInfo info; info.SetL(KFileName, ordinal, uid); INFO_PRINTF1(_L("Test:doTestResourceReaderWithGoodDataL:01 Test: ExternalizeL")); // open reader on contents RResourceReader& reader = LoadResourcesL(KRscFileBuffer, R_COMMAND_LOAD_SUP1); // construct command TSsmCommandParameters params(reader, NULL, 0); CCmdLoadSup* loadSupCmd = CCmdLoadSup::NewL(params); CleanupStack::PushL(loadSupCmd); TEST(loadSupCmd->Type() == ESsmCmdLoadSup); // create output buffer CBufFlat* writebuf = CBufFlat::NewL(1024); CleanupStack::PushL(writebuf); // create output stream on buffer RBufWriteStream writeStream(*writebuf); CleanupClosePushL(writeStream); // externalise the data TRAP(err, loadSupCmd->ExternalizeL(writeStream)); INFO_PRINTF3(_L("ExternalizeL completed with err : %d. expected err : %d"), err, expectedErr); TEST(err == expectedErr); // check the data is correct CompareInputAndOutputL(severity, executionBehaviour, retries, info, writebuf); CleanupStack::PopAndDestroy(&writeStream); CleanupStack::PopAndDestroy(writebuf); CleanupStack::PopAndDestroy(loadSupCmd); FreeResources(); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:49,
示例22: FetchEntryLvoid CMultiThreadTestApp::SynchEntryL(CCalEntryView& aView) { FetchEntryL(aView, iEntries); if(iEntries.Count()>0) { _LIT(KExportFile,"Multithread_export"); RFile outFile; TestRegister().CreateTempFileLC(outFile, KExportFile); RFileWriteStream writeStream(outFile); CleanupClosePushL(writeStream); DataExchangeL().ExportAsyncL(KUidVCalendar, writeStream, iEntries, *this); CActiveScheduler::Start(); CleanupStack::PopAndDestroy(2, &outFile); // outFile.Close(), writeStream.Close() } }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:15,
示例23: CleanupClosePushL/** Export contact items specified by aIds to aFileName */void CAgentTest::ExportContactsL(const TDesC& aFileName) { RFile outfile; outfile.Replace(iTest.Fs(),aFileName,EFileWrite); CleanupClosePushL(outfile); RFileWriteStream writeStream(outfile); CleanupClosePushL(writeStream); TUid uid; uid.iUid=KUidVCardConvDefaultImpl; iDb->ExportSelectedContactsL(uid,*iIdArray,writeStream,CContactDatabase::EDefault); writeStream.CommitL(); CleanupStack::PopAndDestroy(2); //writeStream.Close(), outfile.Close() }
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:16,
示例24: writeStreambool SaveConverter::createStream(SaveWriter &writer) { // Allocate memory for the internal new save data uint32 contSize = writer.getSize(); _data = new byte[contSize]; // Save the newly created new save data Common::MemoryWriteStream writeStream(_data, contSize); if (!writer.save(writeStream)) return false; // Create a reading stream upon that new save data _stream = new Common::MemoryReadStream(_data, contSize); return true;}
开发者ID:peres,项目名称:scummvm,代码行数:15,
注:本文中的writeStream函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ writeString函数代码示例 C++ writeSettings函数代码示例 |