Definition in file ncbistre.hpp.
#include <corelib/ncbistl.hpp>
#include <corelib/ncbitype.h>
#include <string>
Include dependency graph for ncbistre.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | CNcbiOstrstreamToString |
| class | CUpcaseStringConverter |
| class | CUpcaseCharPtrConverter |
| class | CLocaseStringConverter |
| class | CLocaseCharPtrConverter |
| class | CPrintableStringConverter |
| class | CPrintableCharPtrConverter |
Defines | |
| #define | NCBI_USE_OLD_IOSTREAM |
| Determine which iostream library to use, include appropriate headers, and define specific preprocessor variables. | |
| #define | SEEKOFF PUBSEEKOFF |
| #define | NcbiCin IO_PREFIX::cin |
| #define | NcbiCout IO_PREFIX::cout |
| #define | NcbiCerr IO_PREFIX::cerr |
| #define | NcbiClog IO_PREFIX::clog |
| #define | NcbiEndl IO_PREFIX::endl |
| #define | NcbiEnds IO_PREFIX::ends |
| #define | NcbiFlush IO_PREFIX::flush |
| #define | NcbiDec IO_PREFIX::dec |
| #define | NcbiHex IO_PREFIX::hex |
| #define | NcbiOct IO_PREFIX::oct |
| #define | NcbiWs IO_PREFIX::ws |
| #define | NcbiSetbase IO_PREFIX::setbase |
| #define | NcbiResetiosflags IO_PREFIX::resetiosflags |
| #define | NcbiSetiosflags IO_PREFIX::setiosflags |
| #define | NcbiSetfill IO_PREFIX::setfill |
| #define | NcbiSetprecision IO_PREFIX::setprecision |
| #define | NcbiSetw IO_PREFIX::setw |
| #define | NcbiGoodbit IOS_PREFIX::goodbit |
| #define | NcbiEofbit IOS_PREFIX::eofbit |
| #define | NcbiFailbit IOS_PREFIX::failbit |
| #define | NcbiBadbit IOS_PREFIX::badbit |
| #define | NcbiHardfail IOS_PREFIX::hardfail |
| #define | CT_INT_TYPE NCBI_NS_STD::char_traits<char>::int_type |
| #define | CT_CHAR_TYPE NCBI_NS_STD::char_traits<char>::char_type |
| #define | CT_POS_TYPE NCBI_NS_STD::char_traits<char>::pos_type |
| #define | CT_OFF_TYPE NCBI_NS_STD::char_traits<char>::off_type |
| #define | CT_EOF NCBI_NS_STD::char_traits<char>::eof() |
| #define | CT_NOT_EOF NCBI_NS_STD::char_traits<char>::not_eof |
| #define | CT_TO_INT_TYPE NCBI_NS_STD::char_traits<char>::to_int_type |
| #define | CT_TO_CHAR_TYPE NCBI_NS_STD::char_traits<char>::to_char_type |
| #define | CT_EQ_INT_TYPE NCBI_NS_STD::char_traits<char>::eq_int_type |
Typedefs | |
| typedef IO_PREFIX::streampos | CNcbiStreampos |
| Portable alias for streampos. | |
| typedef IO_PREFIX::streamoff | CNcbiStreamoff |
| Portable alias for streamoff. | |
| typedef IO_PREFIX::ios | CNcbiIos |
| Portable alias for ios. | |
| typedef IO_PREFIX::streambuf | CNcbiStreambuf |
| Portable alias for streambuf. | |
| typedef IO_PREFIX::istream | CNcbiIstream |
| Portable alias for istream. | |
| typedef IO_PREFIX::ostream | CNcbiOstream |
| Portable alias for ostream. | |
| typedef IO_PREFIX::iostream | CNcbiIostream |
| Portable alias for iostream. | |
| typedef IO_PREFIX::strstreambuf | CNcbiStrstreambuf |
| Portable alias for strstreambuf. | |
| typedef IO_PREFIX::istrstream | CNcbiIstrstream |
| Portable alias for istrstream. | |
| typedef IO_PREFIX::ostrstream | CNcbiOstrstream |
| Portable alias for ostrstream. | |
| typedef IO_PREFIX::strstream | CNcbiStrstream |
| Portable alias for strstream. | |
| typedef IO_PREFIX::filebuf | CNcbiFilebuf |
| Portable alias for filebuf. | |
| typedef IO_PREFIX::ifstream | CNcbiIfstream |
| Portable alias for ifstream. | |
| typedef IO_PREFIX::ofstream | CNcbiOfstream |
| Portable alias for ofstream. | |
| typedef IO_PREFIX::fstream | CNcbiFstream |
| Portable alias for fstream. | |
Enumerations | |
| enum | EEncodingForm { eEncodingForm_Unknown, eEncodingForm_ISO8859_1, eEncodingForm_Windows_1252, eEncodingForm_Utf8, eEncodingForm_Utf16Native, eEncodingForm_Utf16Foreign } |
| Helper functions to read plain-text data streams. More... | |
| enum | EReadUnknownNoBOM { eNoBOM_RawRead, eNoBOM_GuessEncoding } |
| How to read the text if the encoding form is not known (i.e. More... | |
| enum | EBOMDiscard { eBOM_Discard, eBOM_Keep } |
| Whether to discard BOM or to keep it in the input stream. More... | |
Functions | |
| const char * | Endl (void) |
| Platform-specific EndOfLine. | |
| CNcbiIstream & | NcbiGetline (CNcbiIstream &is, string &str, char delim) |
| Read from "is" to "str" up to the delimiter symbol "delim" (or EOF). | |
| CNcbiIstream & | NcbiGetline (CNcbiIstream &is, string &str, const string &delims) |
| Read from "is" to "str" up to any symbol contained within "delims" (or EOF). | |
| CNcbiIstream & | NcbiGetlineEOL (CNcbiIstream &is, string &str) |
| Read from "is" to "str" the next line (taking into account platform specifics of End-of-Line). | |
| bool | NcbiStreamCopy (CNcbiOstream &os, CNcbiIstream &is) |
| Copy entire contents of stream "is" into "os". | |
| Int8 | NcbiStreamposToInt8 (NCBI_NS_STD::char_traits< char >::pos_type stream_pos) |
| Convert stream position to 64-bit int. | |
| NCBI_NS_STD::char_traits< char >::pos_type | NcbiInt8ToStreampos (Int8 pos) |
| Convert plain numeric stream position (offset) into stream position usable with STL stream library. | |
| char | Upcase (char c) |
| CUpcaseStringConverter | Upcase (const string &s) |
| CUpcaseCharPtrConverter | Upcase (const char *s) |
| char | Locase (char c) |
| CLocaseStringConverter | Locase (const string &s) |
| CLocaseCharPtrConverter | Locase (const char *s) |
| string | Printable (char c) |
| CPrintableStringConverter | Printable (const string &s) |
| CPrintableCharPtrConverter | Printable (const char *s) |
| CNcbiOstream & | operator<< (CNcbiOstream &out, CUpcaseStringConverter s) |
| CNcbiOstream & | operator<< (CNcbiOstream &out, CUpcaseCharPtrConverter s) |
| CNcbiOstream & | operator<< (CNcbiOstream &out, CLocaseStringConverter s) |
| CNcbiOstream & | operator<< (CNcbiOstream &out, CLocaseCharPtrConverter s) |
| CNcbiOstream & | operator<< (CNcbiOstream &out, CPrintableStringConverter s) |
| CNcbiOstream & | operator<< (CNcbiOstream &out, CPrintableCharPtrConverter s) |
| EEncodingForm | ReadIntoUtf8 (CNcbiIstream &input, CStringUTF8 *result, EEncodingForm encoding_form=eEncodingForm_Unknown, EReadUnknownNoBOM what_if_no_bom=eNoBOM_GuessEncoding) |
| Read all input data from stream and try convert it into UTF8 string. | |
| EEncodingForm | GetTextEncodingForm (CNcbiIstream &input, EBOMDiscard discard_bom) |
| Detect if the stream has BOM. | |
| void | BASE64_Encode (const void *src_buf, size_t src_size, size_t *src_read, void *dst_buf, size_t dst_size, size_t *dst_written, size_t *line_len) |
| BASE64-encode up to "src_size" symbols(bytes) from buffer "src_buf". | |
| int | BASE64_Decode (const void *src_buf, size_t src_size, size_t *src_read, void *dst_buf, size_t dst_size, size_t *dst_written) |
| BASE64-decode up to "src_size" symbols(bytes) from buffer "src_buf". | |
| END_NCBI_SCOPE NCBI_NS_NCBI::CNcbiOstream & | operator<< (NCBI_NS_NCBI::CNcbiOstream &os, const NCBI_NS_STD::string &str) |
| NCBI_NS_NCBI::CNcbiIstream & | operator>> (NCBI_NS_NCBI::CNcbiIstream &is, NCBI_NS_STD::string &str) |
|
|
Determine which iostream library to use, include appropriate headers, and define specific preprocessor variables. The default is the new(template-based, std::) one. Definition at line 48 of file ncbistre.hpp. |
|
|
Definition at line 116 of file ncbistre.hpp. |
|
|
Whether to discard BOM or to keep it in the input stream.
Definition at line 674 of file ncbistre.hpp. |
|
|
Helper 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
Definition at line 611 of file ncbistre.hpp. |
|
|
How to read the text if the encoding form is not known (i.e. passed "eEncodingForm_Unknown" and the stream does not have BOM too)
Definition at line 631 of file ncbistre.hpp. |
|
||||||||||||||||||||||||||||
|
BASE64-decode up to "src_size" symbols(bytes) from buffer "src_buf". Write the decoded data to buffer "dst_buf", but no more than "dst_size" bytes. Assign "*src_read" with the # of bytes successfully decoded from "src_buf". Assign "*dst_written" with the # of bytes written to buffer "dst_buf". Return FALSE (0) only if this call cannot decode anything. Destination buffer size, as a worst case equal to the source size, will accomodate the entire input. As a rule, each 4 bytes of source (line breaks skipped) are converted into 3 bytes on output. Definition at line 672 of file ncbistre.cpp. Referenced by MzXmlReader::convertPeaks(), CObjectIStreamXml::ReadBytes(), CNetScheduleKeys::x_Add(), and CNetScheduleHandler::x_DeserializeBitVector(). |
|
||||||||||||||||||||||||||||||||
|
BASE64-encode up to "src_size" symbols(bytes) from buffer "src_buf".
Write the encoded data to buffer "dst_buf", but no more than "dst_size" bytes. Assign "*src_read" with the # of bytes successfully encoded from "src_buf". Assign "*dst_written" with the # of bytes written to buffer "dst_buf". Resulting lines will not exceed "*line_len" (or the standard default if "line_len" is NULL) bytes; *line_len == 0 disables line breaks. To estimate required destination buffer size, you can take into account that BASE64 coding converts every 3 bytes of source into 4 bytes on destination, not including the line breaks (' Definition at line 600 of file ncbistre.cpp. References _ASSERT, bits, and len. Referenced by CObjectOStreamXml::WriteBase64Bytes(), CObjectOStreamJson::WriteBase64Bytes(), and CNetScheduleHandler::x_SerializeBitVector(). |
|
||||||||||||
|
Detect if the stream has BOM.
Definition at line 548 of file ncbistre.cpp. References eEncodingForm_Unknown, eEncodingForm_Utf16Foreign, eEncodingForm_Utf16Native, and eEncodingForm_Utf8. |
|
|
Definition at line 553 of file ncbistre.hpp. |
|
|
Definition at line 547 of file ncbistre.hpp. |
|
|
Definition at line 541 of file ncbistre.hpp. |
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 375 of file ncbistre.cpp. |
|
||||||||||||
|
Definition at line 361 of file ncbistre.cpp. |
|
||||||||||||
|
Definition at line 262 of file ncbistre.cpp. |
|
||||||||||||
|
Definition at line 244 of file ncbistre.cpp. |
|
||||||||||||
|
Definition at line 253 of file ncbistre.cpp. |
|
||||||||||||
|
Definition at line 235 of file ncbistre.cpp. |
|
||||||||||||
|
|
|
|
Definition at line 568 of file ncbistre.hpp. |
|
|
Definition at line 562 of file ncbistre.hpp. |
|
|
Definition at line 283 of file ncbistre.cpp. Referenced by IRegistry::Write(). |
|
||||||||||||||||||||
|
Read all input data from stream and try convert it into UTF8 string.
Definition at line 424 of file ncbistre.cpp. References eEncodingForm_Unknown. Referenced by CCgiEntry::GetValueAsUTF8(). |
|
|
Definition at line 535 of file ncbistre.hpp. |
|
|
Definition at line 529 of file ncbistre.hpp. |
|
|
Definition at line 523 of file ncbistre.hpp. |
1.4.6
Modified on Mon Dec 07 16:21:20 2009 by modify_doxy.py rev. 173732