1 #ifndef CORELIB___RWSTREAMBUF__HPP
2 #define CORELIB___RWSTREAMBUF__HPP
43 #ifdef NCBI_COMPILER_MIPSPRO
44 # define CRWStreambufBase CMIPSPRO_ReadsomeTolerantStreambuf
46 # define CRWStreambufBase CNcbiStreambuf
47 # ifdef NCBI_COMPILER_MSVC
48 # pragma warning(push)
49 # pragma warning(disable:4996)
68 fOwnAll = fOwnReader + fOwnWriter,
70 fNoStatusLog = 1 << 3,
71 fLogExceptions = 1 << 4,
72 fLeakExceptions = 1 << 5
78 streamsize buf_size = 0,
86 streamsize buf_size = 0,
98 virtual streamsize showmanyc(
void);
100 virtual int sync(
void);
124 IOS_BASE::openmode which =
130 {
return xsgetn(
buf,
n); }
135 {
return x_GPos - (
CT_OFF_TYPE)(gptr() ? egptr() - gptr() : 0); }
138 {
return x_PPos + (
CT_OFF_TYPE)(pbase() ? pbase() - pptr() : 0); }
141 {
return pbase() < pptr() ? sync() : 0; }
176 #ifdef NCBI_COMPILER_MSVC
177 # pragma warning(pop)
Reader-writer-based stream buffer.
CT_CHAR_TYPE * m_WriteBuf
CT_POS_TYPE x_ErrPos
position of the _write_ error (if x_Err)
virtual streamsize _Xsgetn_s(CT_CHAR_TYPE *buf, size_t, streamsize n)
EFlags
Which of the objects (passed in the constructor) must be deleted on this object's destruction,...
int TFlags
Bitwise OR of EFlags.
CT_POS_TYPE x_GPos
get position [for istream::tellg()]
CRWStreambuf operator=(const CRWStreambuf &)
bool x_Err
whether there was a _write_ error
CT_POS_TYPE x_GetGPos(void)
CRWStreambuf(const CRWStreambuf &)
CT_POS_TYPE x_GetPPos(void)
AutoPtr< IReader > m_Reader
AutoPtr< IWriter > m_Writer
CT_POS_TYPE x_PPos
put position [for ostream::tellp()]
A very basic data-read/write interface.
A very basic data-read interface.
A very basic data-write interface.
Abstract reader-writer interface classes.
std::ofstream out("events_result.xml")
main entry point for tests
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
ERW_Result
Result codes for I/O operations.
IO_PREFIX::streambuf CNcbiStreambuf
Portable alias for streambuf.
#define NCBI_XNCBI_EXPORT
static int x_Pushback(SOCK sock, BUF buf)
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
std::istream & in(std::istream &in_, double &x_)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)