Definition at line 729 of file ncbistre.hpp.
◆ CT_EOF #define CT_EOF NCBI_NS_STD::char_traits<char>::eof()Definition at line 732 of file ncbistre.hpp.
◆ CT_EQ_INT_TYPE #define CT_EQ_INT_TYPE NCBI_NS_STD::char_traits<char>::eq_int_typeDefinition at line 736 of file ncbistre.hpp.
◆ CT_INT_TYPE #define CT_INT_TYPE NCBI_NS_STD::char_traits<char>::int_typeDefinition at line 728 of file ncbistre.hpp.
◆ CT_NOT_EOF #define CT_NOT_EOF NCBI_NS_STD::char_traits<char>::not_eofDefinition at line 733 of file ncbistre.hpp.
◆ CT_OFF_TYPE #define CT_OFF_TYPE NCBI_NS_STD::char_traits<char>::off_typeDefinition at line 731 of file ncbistre.hpp.
◆ CT_POS_TYPE ◆ CT_TO_CHAR_TYPE #define CT_TO_CHAR_TYPE NCBI_NS_STD::char_traits<char>::to_char_typeDefinition at line 735 of file ncbistre.hpp.
◆ CT_TO_INT_TYPE #define CT_TO_INT_TYPE NCBI_NS_STD::char_traits<char>::to_int_typeDefinition at line 734 of file ncbistre.hpp.
◆ NCBI_STRSTREAM_INIT #define NCBI_STRSTREAM_INIT ( p, l ) (p), (l)Portable alias for strstreambuf.
Portable alias for istrstream. Portable alias for ostrstream. Portable alias for strstream.
Definition at line 168 of file ncbistre.hpp.
◆ NcbiBadbit #define NcbiBadbit IOS_PREFIX::badbitDefinition at line 571 of file ncbistre.hpp.
◆ NcbiCerr #define NcbiCerr IO_PREFIX::cerrDefinition at line 544 of file ncbistre.hpp.
◆ NcbiCin #define NcbiCin IO_PREFIX::cinDefinition at line 542 of file ncbistre.hpp.
◆ NcbiClog #define NcbiClog IO_PREFIX::clogDefinition at line 545 of file ncbistre.hpp.
◆ NcbiCout #define NcbiCout IO_PREFIX::coutDefinition at line 543 of file ncbistre.hpp.
◆ NcbiDec #define NcbiDec IO_PREFIX::decDefinition at line 552 of file ncbistre.hpp.
◆ NcbiEndl #define NcbiEndl IO_PREFIX::endlDefinition at line 548 of file ncbistre.hpp.
◆ NcbiEnds #define NcbiEnds IO_PREFIX::endsDefinition at line 549 of file ncbistre.hpp.
◆ NcbiEofbit #define NcbiEofbit IOS_PREFIX::eofbitDefinition at line 569 of file ncbistre.hpp.
◆ NcbiFailbit #define NcbiFailbit IOS_PREFIX::failbitDefinition at line 570 of file ncbistre.hpp.
◆ NcbiFixed #define NcbiFixed IO_PREFIX::fixedDefinition at line 557 of file ncbistre.hpp.
◆ NcbiFlush #define NcbiFlush IO_PREFIX::flushDefinition at line 550 of file ncbistre.hpp.
◆ NcbiGoodbit #define NcbiGoodbit IOS_PREFIX::goodbitDefinition at line 568 of file ncbistre.hpp.
◆ NcbiHardfail #define NcbiHardfail IOS_PREFIX::hardfailDefinition at line 572 of file ncbistre.hpp.
◆ NcbiHex ◆ NcbiOct #define NcbiOct IO_PREFIX::octDefinition at line 554 of file ncbistre.hpp.
◆ NcbiResetiosflags #define NcbiResetiosflags IO_PREFIX::resetiosflagsDefinition at line 561 of file ncbistre.hpp.
◆ NcbiScientific #define NcbiScientific IO_PREFIX::scientificDefinition at line 558 of file ncbistre.hpp.
◆ NcbiSetbase #define NcbiSetbase IO_PREFIX::setbaseDefinition at line 560 of file ncbistre.hpp.
◆ NcbiSetfill #define NcbiSetfill IO_PREFIX::setfillDefinition at line 563 of file ncbistre.hpp.
◆ NcbiSetiosflags #define NcbiSetiosflags IO_PREFIX::setiosflagsDefinition at line 562 of file ncbistre.hpp.
◆ NcbiSetprecision #define NcbiSetprecision IO_PREFIX::setprecisionDefinition at line 564 of file ncbistre.hpp.
◆ NcbiSetw #define NcbiSetw IO_PREFIX::setwDefinition at line 565 of file ncbistre.hpp.
◆ NcbiWs ◆ _Mybase [1/2] ◆ _Mybase [2/2]template<typename _Base , IOS_BASE::openmode _DefMode>
Definition at line 243 of file ncbistre.hpp.
◆ CNcbiFilebuf ◆ CNcbiFstream ◆ CNcbiIfstream ◆ CNcbiIos ◆ CNcbiIostream ◆ CNcbiIstream ◆ CNcbiOfstream ◆ CNcbiOstream ◆ CNcbiOstrstream ◆ CNcbiStreambuf ◆ CNcbiStreamoff ◆ CNcbiStreampos ◆ CNcbiStrstream ◆ enable_if_integral [1/2] ◆ enable_if_integral [2/2]template<typename _Base , IOS_BASE::openmode _DefMode>
template<class T >
Definition at line 254 of file ncbistre.hpp.
◆ EBOMDiscardWhether to discard BOM or to keep it in the input stream.
Discard the read BOM bytes.
eBOM_KeepPush the read BOM bytes back into the input stream.
Definition at line 1056 of file ncbistre.hpp.
◆ ECompareTextModeMode to compare streams in text form.
Enumerator eCompareText_IgnoreEolSkip end-of-line characters ('\r' and '
')
Skip white spaces (in terms of isspace(), including end-of-line)
eCompareText_IgnoreWhiteSpaceDefinition at line 686 of file ncbistre.hpp.
◆ EEncodingFormHelper functions to read plain-text data streams.
It understands Byte Order Mark (BOM) and converts the input if needed.
See clause 13.6 in http://www.unicode.org/unicode/uni2book/ch13.pdf and also http://unicode.org/faq/utf_bom.html#BOM
Stream has no BOM.
eEncodingForm_ISO8859_1Stream has no BOM.
eEncodingForm_Windows_1252Stream has no BOM.
eEncodingForm_Utf8Stream has UTF8 BOM.
eEncodingForm_Utf16NativeStream has UTF16 BOM. Byte order is native for this OS.
eEncodingForm_Utf16ForeignStream has UTF16 BOM. Byte order is nonnative for this OS.
Definition at line 994 of file ncbistre.hpp.
◆ EPushback_How Enumerator ePushback_Copy ePushback_NoCopy ePushback_StepbackDefinition at line 125 of file stream_utils.hpp.
◆ EReadUnknownNoBOMHow to read the text if the encoding form is not known (i.e.
passed "eEncodingForm_Unknown" and the stream does not have BOM too)
Read the text "as is" (raw octal data).
The read data can then be accessed using the regular std::string API (rather than the CStringUTF8 one).
eNoBOM_GuessEncodingTry to guess the text's encoding form.
Definition at line 1014 of file ncbistre.hpp.
◆ ERW_ResultResult codes for I/O operations.
Action / information is not available.
eRW_SuccessEverything is okay, I/O completed.
eRW_TimeoutTimeout expired, try again later.
eRW_ErrorUnrecoverable error, no retry possible.
eRW_EofEnd of data, should be considered permanent.
Definition at line 60 of file reader_writer.hpp.
◆ CByteOrderMark() [1/2] ◆ CByteOrderMark() [2/2] CByteOrderMark::CByteOrderMark ( void ) inlineDefinition at line 1082 of file ncbistre.hpp.
◆ CLocaseCharPtrConverter() CLocaseCharPtrConverter::CLocaseCharPtrConverter ( const char * s ) inlineexplicitDefinition at line 871 of file ncbistre.hpp.
◆ CLocaseStringConverter() ◆ CNcbiIstrstream() [1/5] CNcbiIstrstream::CNcbiIstrstream ( char * _Ptr ) inlineexplicitDefinition at line 184 of file ncbistre.hpp.
◆ CNcbiIstrstream() [2/5]template<typename TInteger , typename = typename enable_if_integral<TInteger>::type>
CNcbiIstrstream::CNcbiIstrstream ( char * _Ptr, TInteger _Count ) inlineDefinition at line 193 of file ncbistre.hpp.
◆ CNcbiIstrstream() [3/5] CNcbiIstrstream::CNcbiIstrstream ( const char * _Ptr ) inlineexplicitDefinition at line 179 of file ncbistre.hpp.
◆ CNcbiIstrstream() [4/5]template<typename TInteger , typename = typename enable_if_integral<TInteger>::type>
CNcbiIstrstream::CNcbiIstrstream ( const char * _Ptr, TInteger _Count ) inlineDefinition at line 198 of file ncbistre.hpp.
◆ CNcbiIstrstream() [5/5] ◆ CNcbiOstrstreamToString() [1/2] ◆ CNcbiOstrstreamToString() [2/2] ◆ CNcbistrstream_Base() [1/2]template<typename _Base , IOS_BASE::openmode _DefMode>
template<typename TInteger , typename = typename enable_if_integral<TInteger>::type>
Definition at line 258 of file ncbistre.hpp.
◆ CNcbistrstream_Base() [2/2]template<typename _Base , IOS_BASE::openmode _DefMode>
Definition at line 244 of file ncbistre.hpp.
◆ CPrintableCharPtrConverter() CPrintableCharPtrConverter::CPrintableCharPtrConverter ( const char * s ) inlineexplicitDefinition at line 896 of file ncbistre.hpp.
◆ CPrintableStringConverter() CPrintableStringConverter::CPrintableStringConverter ( const string & s ) inlineexplicitDefinition at line 889 of file ncbistre.hpp.
◆ CRStream() ◆ CRWStream() [1/2] ◆ CRWStream() [2/2] ◆ CStreamReader() [1/2] ◆ CStreamReader() [2/2] ◆ CStreamWriter() [1/2] ◆ CStreamWriter() [2/2] ◆ CStringReader() ◆ CUpcaseCharPtrConverter() CUpcaseCharPtrConverter::CUpcaseCharPtrConverter ( const char * s ) inlineexplicitDefinition at line 851 of file ncbistre.hpp.
◆ CUpcaseStringConverter() ◆ CWStream() ◆ Endl() const char* Endl ( void ) ◆ Flush() [1/2] ◆ Flush() [2/2]Flush pending data (if any) down to the output device.
Implemented in COSSWriter, CBufferWriter< TBuffer >, CBufferWriter< Buffer >, CxBlobWriter, CBDB_CacheIWriter, CNetCacheWriter, CCgiStreamWrapperWriter, COSSWriter, COSSWriter, CTransmissionWriter, CMultiWriter, CChecksumStreamWriter, CBufferWriter< TBuffer >, CBufferWriter< Buffer >, COctetStringSequenceWriter, CWriter_HTMLEncoder, CBlobWriter, CBDB_BlobReaderWriter, CStreamWriter, CFileReaderWriter, CFileWriter, CSocketReaderWriter, NDirectNetStorageImpl::CWOFileTrack, NDirectNetStorageImpl::CWONetCache, NDirectNetStorageImpl::CRWNotFound, NDirectNetStorageImpl::CObj, SNetStorageObjectRPC, SNetStorageObjectRPC::SOState, SNetStorage_NetCacheBlob, SNetStorage_NetCacheBlob::SOState, SEmbeddedStreamReaderWriter, SH2S_ReaderWriter, CStringOrWriter, SNetStorageObjectIState, CMD5StreamWriter< Buffer >, and CNullWriter.
Referenced by SEmbeddedStreamReaderWriter::Flush(), CTransmissionWriter::Flush(), CRWStreambuf::overflow(), and CSegmentSmearGlyph::CSegMap::Serialize().
◆ g_ExtractReaderContents() ◆ g_RW_ResultToString() ◆ GetEncodingForm() ◆ GetOssSize() ◆ GetTextEncodingForm()Detect if the stream has BOM.
NOTE: If the function needs to push back more than one char then it uses CStreamUtils::Pushback().
Definition at line 782 of file ncbistre.cpp.
References eBOM_Keep, eEncodingForm_Unknown, eEncodingForm_Utf16Foreign, eEncodingForm_Utf16Native, eEncodingForm_Utf8, input(), int, n, CStreamUtils::Pushback(), and tmp.
Referenced by operator>>(), and IRWRegistry::Read().
◆ IsOssEmpty()Definition at line 831 of file ncbistre.hpp.
References GetOssSize().
Referenced by CRemoteCgiJob::Do(), Empty(), CEditingActionFlatFile::Find(), CFlatFileField::GetVal(), CAgpErrEx::LineDone(), CMonitoredProcessWatcher::MonitorRun(), CException::ReportThis(), CMacroFunction_FixSpelling::TheFunction(), CSeqUpdateWorker::x_LaunchSingleUpdateSequence(), CMonitoredProcessWatcher::x_Log(), IMacroFunction< CIRef< IMacroBioDataIter > >::x_LogError(), IMacroFunction< CIRef< IMacroBioDataIter > >::x_LogFunction(), CNcbiDiag::x_Put(), and CUpdateMultiSeq_Dlg::x_UpdateSelected().
◆ Locase() [1/3] ◆ Locase() [2/3] ◆ Locase() [3/3] ◆ NcbiGetline() [1/2]Read from "is" to "str" up to the delimiter symbol "delim" (or EOF)
Referenced by CFormatGuess::EnsureStats(), CTableImportDataSource::LoadTable(), MyGetline(), CStreamLineReader::operator++(), CSplitCacheApp::Process(), ProcessStream(), CAgpReader::ReadStream(), COMSSAMerge::Run(), CAgpFastaComparator::Run(), s_GetBigBedFeats(), s_GetBigBedSummary(), CFormatGuess::TestFormatCLUSTAL(), CFormatGuess::TestFormatTextAsn(), CStreamLineReader::x_AdvanceEOLCRLF(), CStreamLineReader::x_AdvanceEOLSimple(), CStreamLineReader::x_AdvanceEOLUnknown(), CCgiEntryReaderContext::x_DelimitedRead(), CWigGraph::x_GetBigWigSummary(), CRegexpTemplateTester::x_GetLine(), CSDB_ConnectionParam::x_GetPassword(), CBlastVdbCmdApp::x_InitApplicationData(), CAgpValidateApplication::x_LoadLenFa(), CHTMLPage::x_LoadTemplateLib(), and CAgpValidateApplication::x_ValidateFile().
◆ NcbiGetline() [2/2]Read from "is" to "str" up to any symbol contained within "delims" (or EOF)
Read from "is" to "str" the next line (taking into account platform specifics of End-of-Line)
Referenced by CLinkUtils::AddSequenceLinks(), AgpRead(), BOOST_AUTO_TEST_CASE(), CDBInterfacesFileConnParams::CDBInterfacesFileConnParams(), CBlastDBAliasApp::ConvertGiFile(), CDumpSysInfo::DumpSystemInfo(), CPhyObjectLoader::Execute(), CWinMaskConfig::FillIdList(), CFeedbackReport::Format(), CCodeGenerator::GenerateCvsignore(), CProjectsLstFileFilter::GetAllowedTagsInfo(), GetIDsFromFile(), Getline(), CTextUtil::GetWordFrequencies(), CProjectsLstFileFilter::InitFromFile(), CIdMapperConfig::Initialize(), CAgpConverter::LoadChromosomeMap(), CProjBulderApp::LoadDepGraph(), CSimpleMakeFileContents::LoadFrom(), CSimpleMakeFileContents::SParser::LoadInclude(), CProjBulderApp::LoadProjectTags(), CWinMaskUtil::CInputBioseq_CI::operator++(), CMakefilePatch::PatchTreeMakefiles(), PromoteIfDifferent(), CDiagErrCodeInfo::Read(), CSimpleDictionary::Read(), CGlimmerReader::Read(), CRepeatLibrary::Read(), CDistanceMatrix::Read(), CColumnarVCFReader::ReadData(), ReadTextFile(), CColumnarVCFReader::ReadVariantsForChrs(), CNcbiApplogApp::Redirect(), CDemoSeqQaApp::Run(), CNcbiApplogApp::Run(), CTax4BlastDemo::Run(), CAsn2FastaApp::Run(), CAsn2FlatApp::Run(), CPubmedFetchApplication::Run(), CAsnCacheTestApplication::Run(), CPrimeCacheApplication::Run(), CAsnSubCacheCreateApplication::Run(), CMytestApplication::Run(), s_CheckSorted(), s_LookForOidlistInAliasFile(), s_ReadIdsFromFile(), s_UpdateVolumesInAliasFile(), CTaxIdSet::SetMappingFromFile(), NuclWordFinderTextFixture::setupSequenceOffsets(), CCodeGenerator::UndoGenerateCode(), CBlastUsageReport::x_CheckRunEnv(), CBlastDBAliasApp::x_ConvertSeqIDFile(), CWigGraph::x_GetBigWigData(), CBlastVdbCmdApp::x_GetQueries(), CMakeProfileDBApp::x_GetSMPFilenames(), CBlastDBCmdApp::x_InitBlastDB_TaxIdList(), CUnicodeToAsciiTranslation::x_Initialize(), CBlastDBCmdApp::x_ProcessBatchEntry(), CBlastDBCmdApp::x_ProcessBatchEntry_NoDup(), CBlastDBCmdApp::x_ProcessBatchPig(), IRWRegistry::x_Read(), CPrimeCacheApplication::x_Read_Ids(), and CBLASTDatabases::x_UpdateDbMap().
◆ NcbiInt8ToStreampos() NCBI_NS_STD::char_traits<char>::pos_type NcbiInt8ToStreampos ( Int8 pos ) inline ◆ NcbiStreamCompare()Compare stream contents in binary form.
Definition at line 356 of file ncbistre.cpp.
◆ NcbiStreamCompareText() [1/2]Compare stream content with string in text form.
Definition at line 419 of file ncbistre.cpp.
References NcbiStreamCompareText(), and str().
◆ NcbiStreamCompareText() [2/2]Compare stream contents in text form.
Definition at line 394 of file ncbistre.cpp.
References x_GetChar().
Referenced by CFile::CompareTextContents(), and NcbiStreamCompareText().
◆ NcbiStreamCopy()Copy the entire contents of stream "is" to stream "os".
The call may throw exceptions only if they are enabled on the respective stream(s).
Definition at line 211 of file ncbistre.cpp.
References _ASSERT, CT_EOF, CT_EQ_INT_TYPE, and true.
Referenced by CChunkFile::Append(), CSeqIdChunkFile::Append(), CGridRPCBaseClient< CAsnBinCompressed >::AskStream(), CTmpStreamGuard::Close(), CBiosampleChkApp::CreateBiosampleUpdateWebService(), CCompareWithBiosample::CreateBiosampleUpdateWebService(), CGBenchFeedbackAttachment::EncodeData(), SAsyncWriteTask::Execute(), SFileTrackRequest::GetFileInfo(), CDoiLookup::GetPubFromCrossRef(), CCgiApplication::GetResultFromCache(), CProjectStorage::GetString(), CProjectStorage::GetVector(), CIdMapperConfig::Initialize(), CGBDocument::LoadFile(), CNetScheduleJobSerializer::LoadJobInput(), NcbiStreamCopyThrow(), CManipulatorOProxy< TInputStream, TOutputStream >::operator<<(), CManipulatorIProxy< TInputStream, TOutputStream >::operator>>(), CGridCommandLineInterfaceApp::PrepareRemoteAppJobInput(), CHttpSessionApp::PrintResponse(), CCgiRequestProcessor::ProcessHelpRequest(), CCgi2RCgiApp::ReadJob(), CSftpSampleApp::Run(), CHttpSessionApp::Run(), s_UpdateLocalFile(), CNetScheduleJobSerializer::SaveJobInput(), CNetScheduleJobSerializer::SaveJobOutput(), CCgiApplication::SaveResultToCache(), CProjectStorage::SaveStream(), CRemoteAppClientSampleApp::ShowBlob(), CRPCClient_Base::x_Ask(), CCompressedFile::x_DownloadFile(), CEutilsClient::x_FetchOnce(), CEutilsClient::x_GetOnce(), CTMS_DisplayTrack_Client::x_HttpFetch(), x_IsUrlAccessible(), CEutilsClient::x_LinkOnce(), CEutilsClient::x_LinkOnceT(), CGridCommandLineInterfaceApp::x_LoadJobInput(), CCgiRequest::x_ProcessInputStream(), and CEutilsClient::x_SearchOnce().
◆ NcbiStreamCopyHead()Similar to NcbiStreamCopyThrow() but copies (and consumes) only the specified number of bytes (and bypasses operator<< altogether).
In the event of write failure, the number of bytes consumed may fall anywhere between the number of bytes written and the target count, inclusive. If the input stream has less data than requested, copies what it can, sets that stream's eof and fail flags, and returns normally; if anything else goes wrong, throws an exception in addition to setting appropriate flags (and copying what it can).
Convert stream position to 64-bit int.
On most systems stream position is a structure, this function converts it to plain numeric value.
Definition at line 771 of file ncbistre.hpp.
References CT_OFF_TYPE, and CT_POS_TYPE.
Referenced by CRowReader< TTraits >::CRowReader(), CBDB_ExtBlobStore< TBV >::Flush(), GetOssSize(), CObjectIStream::GetPosition(), CObjectOStream::GetPosition(), CObjectIStream::Location(), CLDS2_ObjectParser::ParseNext(), CProcessor_St_SE_SNPT::ProcessStream(), s_FindAttribute(), CLDS2_SeqEntry_Hook::SkipObject(), CFastaReader::StreamPosition(), CRowReader< TTraits >::Validate(), CRowReader< TTraits >::x_GetRowData(), CCgiApplication::x_OnEvent(), CLDS2_Manager::x_ParseFile(), CFastCgiApplicationMT::x_ProcessThreadedRequest(), and CRowReader< TTraits >::x_ReadNextRow().
◆ NcbiStreamToString()Input the entire contents of an istream into a string (NULL causes drain).
"is" gets its failbit set if nothing was extracted from it; and gets its eofbit (w/o failbit) set if the stream has reached an EOF condition.
Definition at line 296 of file ncbistre.cpp.
References _ASSERT, buf, count, NcbiEofbit, NcbiFailbit, and str().
Referenced by edirect::Execute(), LoadFile(), CEUtils_Request::Read(), CId1FetchApp::Run(), fix_pub::s_IsIndexed(), and CMsvcConfigure::WriteBuildVer().
◆ operator string() CNcbiOstrstreamToString::operator string ( void ) const ◆ operator<<() [1/9] ◆ operator<<() [2/9] ◆ operator<<() [3/9] ◆ operator<<() [4/9] ◆ operator<<() [5/9] ◆ operator<<() [6/9] ◆ operator<<() [7/9] ◆ operator<<() [8/9] ◆ operator<<() [9/9] ◆ operator=() [1/3] ◆ operator=() [2/3] ◆ operator=() [3/3] ◆ operator>>() [1/2] ◆ operator>>() [2/2] ◆ PendingCount() [1/3] ERW_Result CStreamReader::PendingCount ( size_t * count ) virtualVia parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking.
Return eRW_Success if the number of pending bytes has been stored at the location pointed to by "count". Return eRW_NotImplemented if the number cannot be determined. Otherwise, return other eRW_... condition to reflect the problem ("*count" does not need to be updated in the case of non-eRW_Success). Note that if reporting 0 bytes ready, the method may return either both eRW_Success and zero "*count", or return eRW_NotImplemented alone.
Implements IReader.
Definition at line 627 of file stream_utils.cpp.
References count, eRW_Eof, eRW_Error, eRW_Success, CStreamReader::m_Stream, and NcbiEofbit.
◆ PendingCount() [2/3] ERW_Result CStringReader::PendingCount ( size_t * count ) virtualVia parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking.
Return eRW_Success if the number of pending bytes has been stored at the location pointed to by "count". Return eRW_NotImplemented if the number cannot be determined. Otherwise, return other eRW_... condition to reflect the problem ("*count" does not need to be updated in the case of non-eRW_Success). Note that if reporting 0 bytes ready, the method may return either both eRW_Success and zero "*count", or return eRW_NotImplemented alone.
Implements IReader.
Definition at line 732 of file stream_utils.cpp.
References _ASSERT, count, eRW_Eof, eRW_Success, CStringReader::m_Position, and CStringReader::m_String.
◆ PendingCount() [3/3] virtual ERW_Result IReader::PendingCount ( size_t * count ) pure virtualVia parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking.
Return eRW_Success if the number of pending bytes has been stored at the location pointed to by "count". Return eRW_NotImplemented if the number cannot be determined. Otherwise, return other eRW_... condition to reflect the problem ("*count" does not need to be updated in the case of non-eRW_Success). Note that if reporting 0 bytes ready, the method may return either both eRW_Success and zero "*count", or return eRW_NotImplemented alone.
Implemented in NDirectNetStorageImpl::CROFileTrack, NDirectNetStorageImpl::CRONetCache, NDirectNetStorageImpl::CRWNotFound, NDirectNetStorageImpl::CObj, SNetStorageObjectRPC, SNetStorageObjectRPC::SIState, SNetStorage_NetCacheBlob, SNetStorage_NetCacheBlob::SIState, SH2S_ReaderWriter, CDataChunkReader, SNetStorageObjectOState, CTarReader, CMemoryReader, SPSG_BlobReader, CReaderOfLines, CxBlobReader, CBDB_CacheIReader, CNetCacheReader, CTransmissionReader, CNlmZipReader, CBlobReader, CBDB_BlobReaderWriter, CStringReader, CStreamReader, CFileReaderWriter, CFileReader, CStringOrBlobStorageReader, CSocketReaderWriter, CCgiEntryReader, SEmbeddedStreamReaderWriter, CCGIStreamReader, and CDB_Result_Reader.
Referenced by NCBI_PARAM_DEF_EX(), SEmbeddedStreamReaderWriter::PendingCount(), CTransmissionReader::PendingCount(), and CRWStreambuf::showmanyc().
◆ Printable() [1/3]Convert one single character to a "printable" form.
A "printable" form is one of well-known C-style backslash-quoted sequences ('\0', '', '', '\f', '
', '\r', '\t', '\v', '\', '\'', '"'), or '\xXX' for other non-printable characters (per isprint()), or a graphical representation of 'c' as an ASCII character.
Definition at line 505 of file ncbistre.cpp.
References isprint().
Referenced by CCgiResponse::BeginPart(), and IRegistry::Write().
◆ Printable() [2/3] ◆ Printable() [3/3] ◆ Pushback() [1/4] ◆ Pushback() [2/4] ◆ Pushback() [3/4] ERW_Result CStreamReader::Pushback ( const void * buf, size_t count, void * del_ptr ) virtual ◆ Pushback() [4/4] ERW_Result IReader::Pushback ( const void * buf, size_t count, void * del_ptr =0
) virtual
This method gets called by RStream buffer destructor to return buffered yet still unread (from the stream) portion of data back to the device.
It's semantically equivalent to CStreamUtils::Pushback() with the only difference that IReader can only assume the ownership of "buf" when "del_ptr" is passed non-NULL. Return eRW_Success when data have been successfully pushed back and the ownership of the pointers has been assumed as described above. Any other error code results in pointers remained and handled within the stream buffer being deleted, with an error message suppressed for eRW_NotImplemented (default implementation).
Reimplemented in CStreamReader, and CSocketReaderWriter.
Definition at line 579 of file stream_utils.cpp.
References eRW_NotImplemented.
Referenced by CRWStreambuf::x_Pushback().
◆ Read() [1/3] ERW_Result CStreamReader::Read ( void * buf, size_t count, size_t * bytes_read ) virtualRead as many as "count" bytes into a buffer pointed to by the "buf" argument.
Always store the number of bytes actually read (0 if read none) via the pointer "bytes_read", if provided non-NULL. Return non-eRW_Success code if EOF / error condition has been encountered during the operation (some data may have been read, nevertheless, and reflected in "*bytes_read"). Special case: if "count" is passed as 0, then the value of "buf" must be ignored, and no change should be made to the state of the input device (but may return non-eRW_Success to indicate that the input device has already been in an error condition).
Implements IReader.
Definition at line 600 of file stream_utils.cpp.
References buf, count, eRW_Eof, eRW_Error, eRW_Success, CStreamReader::m_Stream, NcbiBadbit, NcbiEofbit, NcbiFailbit, ok, r(), and result.
◆ Read() [2/3] ERW_Result CStringReader::Read ( void * buf, size_t count, size_t * bytes_read ) virtualRead as many as "count" bytes into a buffer pointed to by the "buf" argument.
Always store the number of bytes actually read (0 if read none) via the pointer "bytes_read", if provided non-NULL. Return non-eRW_Success code if EOF / error condition has been encountered during the operation (some data may have been read, nevertheless, and reflected in "*bytes_read"). Special case: if "count" is passed as 0, then the value of "buf" must be ignored, and no change should be made to the state of the input device (but may return non-eRW_Success to indicate that the input device has already been in an error condition).
Implements IReader.
Definition at line 711 of file stream_utils.cpp.
References _ASSERT, buf, count, eRW_Eof, eRW_Error, eRW_Success, CStringReader::m_Position, CStringReader::m_String, min(), and n.
◆ Read() [3/3] virtual ERW_Result IReader::Read ( void * buf, size_t count, size_t * bytes_read =0
) pure virtual
Read as many as "count" bytes into a buffer pointed to by the "buf" argument.
Always store the number of bytes actually read (0 if read none) via the pointer "bytes_read", if provided non-NULL. Return non-eRW_Success code if EOF / error condition has been encountered during the operation (some data may have been read, nevertheless, and reflected in "*bytes_read"). Special case: if "count" is passed as 0, then the value of "buf" must be ignored, and no change should be made to the state of the input device (but may return non-eRW_Success to indicate that the input device has already been in an error condition).
Implemented in NDirectNetStorageImpl::CROFileTrack, NDirectNetStorageImpl::CRONetCache, NDirectNetStorageImpl::CRWNotFound, SNetStorageObjectRPC::SIState, SNetStorage_NetCacheBlob::SIState, SNetStorageObjectOState, CNetCacheReader, SH2S_ReaderWriter, CDataChunkReader, CTarReader, SPSG_BlobReader, CReaderOfLines, CxBlobReader, CCGIStreamReader, CTransmissionReader, CNlmZipReader, CBlobReader, CFileReaderWriter, CFileReader, CStringOrBlobStorageReader, CSocketReaderWriter, SNetStorageObjectRPC, SNetStorage_NetCacheBlob, CMemoryReader, CBDB_CacheIReader, CDB_Result_Reader, CBDB_BlobReaderWriter, CStringReader, CStreamReader, CCgiEntryReader, SEmbeddedStreamReaderWriter, and NDirectNetStorageImpl::CObj.
Referenced by CSegmentSmearGlyph::CSegMap::Deserialize(), g_ExtractReaderContents(), NCBI_PARAM_DEF_EX(), CIRByteSourceReader::Read(), SEmbeddedStreamReaderWriter::Read(), CNlmZipReader::Read(), CTransmissionReader::Read(), SNetCacheAPIImpl::ReadBuffer(), CTransmissionReader::ReadData(), CNcbiSample_Dbapi_Advanced_Features::RunSample(), CRWStreambuf::underflow(), CNlmZipReader::x_Read(), CRWStreambuf::x_Read(), CBufferedLineReader::x_ReadBuffer(), CWigBufferedLineReader::x_ReadBuffer(), and CNlmZipReader::x_ReadZipHeader().
◆ ReadIntoUtf8()Read all input data from stream and try convert it into UTF8 string.
Definition at line 650 of file ncbistre.cpp.
References CUtf8::AsUTF8(), buf, eEncoding_Ascii, eEncoding_ISO8859_1, eEncoding_Unknown, eEncoding_UTF8, eEncoding_Windows_1252, eEncodingForm_ISO8859_1, eEncodingForm_Unknown, eEncodingForm_Utf16Foreign, eEncodingForm_Utf16Native, eEncodingForm_Utf8, eEncodingForm_Windows_1252, eNoBOM_GuessEncoding, CUtf8::GetValidBytesCount(), CUtf8::GuessEncoding(), input(), int, max(), n, NCBI_THROW, NcbiSys_swab, result, and tmp.
Referenced by CCgiEntry::GetValueAsUTF8(), and IRWRegistry::Read().
◆ Readsome() ◆ SetEncodingForm() void CByteOrderMark::SetEncodingForm ( EEncodingForm encodingForm ) inline ◆ Stepback() ◆ Upcase() [1/3] ◆ Upcase() [2/3] ◆ Upcase() [3/3] ◆ Write() [1/2] ERW_Result CStreamWriter::Write ( const void * buf, size_t count, size_t * bytes_written ) virtualWrite up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device.
Always store the number of bytes actually written, or 0 if "count" has been passed as 0 ("buf" must be ignored in this case), via the "bytes_written" pointer, if provided non-NULL. Note that the method can return non-eRW_Success in case of an I/O error along with indicating (some) data delivered to the output device (and reflected in "*bytes_written").
Implements IWriter.
Definition at line 659 of file stream_utils.cpp.
References buf, count, eRW_Error, eRW_Success, CStreamWriter::m_Stream, NcbiBadbit, NcbiFailbit, ok, and result.
◆ Write() [2/2] virtual ERW_Result IWriter::Write ( const void * buf, size_t count, size_t * bytes_written =0
) pure virtual
Write up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device.
Always store the number of bytes actually written, or 0 if "count" has been passed as 0 ("buf" must be ignored in this case), via the "bytes_written" pointer, if provided non-NULL. Note that the method can return non-eRW_Success in case of an I/O error along with indicating (some) data delivered to the output device (and reflected in "*bytes_written").
Implemented in CBufferWriter< TBuffer >, CBufferWriter< Buffer >, CBufferWriter< TBuffer >, CBufferWriter< Buffer >, COSSWriter, COSSWriter, COSSWriter, COctetStringSequenceWriter, NDirectNetStorageImpl::CWOFileTrack, NDirectNetStorageImpl::CWONetCache, NDirectNetStorageImpl::CRWNotFound, SNetStorageObjectRPC::SOState, SNetStorage_NetCacheBlob::SOState, SIoStreamEmbeddedStreamReaderWriter, SNetStorageObjectIState, SH2S_ReaderWriter, CStringOrWriter, CMD5StreamWriter< Buffer >, CxBlobWriter, CBDB_CacheIWriter, CNetCacheWriter, CCgiStreamWrapperWriter, CTransmissionWriter, CMultiWriter, CChecksumStreamWriter, CWriter_HTMLEncoder, CBlobWriter, CFileReaderWriter, CFileWriter, CSocketReaderWriter, SNetStorageObjectRPC, SNetStorage_NetCacheBlob, CNullWriter, CBDB_BlobReaderWriter, CStreamWriter, SEmbeddedStreamReaderWriter, and NDirectNetStorageImpl::CObj.
Referenced by CWriterSourceCollector::AddChunk(), CRWStreambuf::overflow(), CNcbiSample_Dbapi_Advanced_Features::RunSample(), CSegmentSmearGlyph::CSegMap::Serialize(), SEmbeddedStreamReaderWriter::Write(), CTransmissionWriter::Write(), CTransmissionWriter::WriteUint4(), and CRWStreambuf::xsputn().
◆ x_Pushback()Definition at line 379 of file stream_utils.cpp.
References _ASSERT, buf, CT_CHAR_TYPE, CStreamUtils::ePushback_Copy, CStreamUtils::ePushback_NoCopy, CStreamUtils::ePushback_Stepback, CPushback_Streambuf::kMinBufSize, CPushback_Streambuf::m_Buf, CPushback_Streambuf::m_BufSize, CPushback_Streambuf::m_DelPtr, max(), memmove, and NCBI_THROW.
Referenced by CStreamUtils::Pushback(), and CStreamUtils::Stepback().
◆ ~IReader() ◆ ~IReaderWriter() ◆ ~IWriter() ◆ m_EncodingForm ◆ m_Out ◆ m_Position ◆ m_Sb [1/3] ◆ m_Sb [2/3] ◆ m_Sb [3/3] ◆ m_Stream [1/2] ◆ m_Stream [2/2] ◆ m_String [1/7] ◆ m_String [2/7] const char* CUpcaseCharPtrConverter::m_String ◆ m_String [3/7] ◆ m_String [4/7] const char* CLocaseCharPtrConverter::m_String ◆ m_String [5/7] ◆ m_String [6/7] const char* CPrintableCharPtrConverter::m_String ◆ m_String [7/7] string CStringReader::m_String private ◆ operator<<RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4