⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wy_uty.3wy

📁 一个不错
💻 3WY
字号:
.\".\" Edited by I.J.Wang, 2005.\".TH wy_uty 3wy "libwy v0.31".SH NAME  Global namespace.SH SYNOPSIS.PP.B #include <wy_uty.h>.PP   Utilities for program development.SH "FUNCTIONS" WyRet \fBWy::full_read\fP(WyByteFlow&, void*, size_t, size_t&); WyRet \fBWy::full_read\fP(WyByteFlow&, WyStr&, size_t); WyRet \fBWy::full_write\fP(WyByteFlow&, const void*, size_t, size_t&) WyRet \fBWy::full_write\fP(WyByteFlow&, const WyStr&, size_t&) WyRet \fBWy::full_write\fP(WyByteFlow&, const WyCSeg&, size_t&) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, const WyStr&) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, WyCSeg) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, const char*) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, char*) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, char) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, const void*) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, signed char) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, signed short) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, signed int) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, signed long) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, signed long long) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, unsigned char) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, unsigned short) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, unsigned int) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, unsigned long) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, unsigned long long) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, float) WyByteFlow& \fBoperator <<\fP(WyByteFlow&, double) WyByteFlow& \fBoperator >>\fP(WyByteFlow&, WyStr&) WyByteFlow& \fBoperator >>\fP(WyByteFlow&, char&) WyByteFlow& \fBoperator >>\fP(WyByteFlow&, unsigned char&) WyByteFlow& \fBoperator >>\fP(WyByteFlow&, signed char&).SH "DESCRIPTION" .\"--------------------------------------------.PP.BI "WyRet Wy::full_read(WyByteFlow& " "bf" ", void* " "buf" ", size_t " "count" ", size_t& " "n_read" ")".PP    Read at maximum \fIcount\fP bytes of data, from the system file \fIbf\fP    into memory pointed by \fIbuf\fP. \fIn_read\fP is always written with the    bytes read and stored into \fIbuf\fP.    This function retries a successful \fBread(2)\fP until the amount    \fIcount\fP bytes of data requested is satisfied, or end-of-file is    encountered..PP    [\fBRet\fP] Ok              Succeed. (End-of-file is encountered if                          the returned \fIn_read\fP is less than \fIcount\fP)          Wym_EBADF       Object is not valid for the operation          Wym_EFBIG       \fIcount\fP exceeds the maximum          Wym_EINTR       Interrupted by a signal          Wym_EAGAIN      Non-blocking I/O          Wym_EIO         Low level I/O error          Wym_EINVAL      Device is not suitable for reading          Wym_EFAULT      \fIbuf\fP is inaccessible          Wym_ENOMEM      Not enough memory.PP     [\fBRefer\fP] ::read(int,void*,size_t).\"--------------------------------------------.PP.BI "WyRet Wy::full_read(WyByteFlow& " "bf" ", WyStr& " "buf" ", size_t " "count" ")".PP    Read at maximum \fIcount\fP bytes of data, from the system file    \fIbf\fP into \fIbuf\fP.    This function retries a successful \fBread(2)\fP until the amount    \fIcount\fP bytes of data requested is satisfied, or end-of-file is    encountered..PP    [\fBRet\fP] Ok              Succeed. (End-of-file is encountered if                          the returned data is less than \fIcount\fP)          Wym_EBADF       Object is not valid for the operation          Wym_EFBIG       \fIcount\fP exceeds the maximum          Wym_EINTR       Interrupted by a signal          Wym_EAGAIN      Non-blocking I/O          Wym_EIO         Low level I/O error          Wym_EINVAL      Device is not suitable for reading          Wym_ENOMEM      Not enough memory.PP     [\fBRefer\fP] ::read(int,void*,size_t).\"--------------------------------------------.PP.BI "WyRet Wy::full_write(WyByteFlow& " "bf" ", const void* " "buf" ", size_t " "count" ", size_t& " "n_written" ")".PP    Write \fIcount\fP bytes of data pointed by \fIbuf\fP to the system file    \fIbf\fP. The number of written bytes is always stored into    \fIn_written\fP.    This function retries a successful \fBwrite(2)\fP until the amount    \fIcount\fP bytes is written..PP    [\fBRet\fP] Ok              Succeed          Wym_EBADF       Object is not valid for the operation          Wym_EINVAL      Object attatched device is not suitable          Wym_EFAULT      \fIbuf\fP is inaccessible          Wym_EFBIG       Attempt to write beyond the device limit           Wym_EPIPE       Write to a pipe or FIFO with no reader          Wym_EAGAIN      Non-blocking I/O (write would block)          Wym_EINTR       Interrupted by a signal before data written          Wym_ENOSPC      Device left no space for the operation          Wym_EIO         Low level I/O error.PP     [\fBRefer\fP] ::write(int,const void*,size_t).\"--------------------------------------------.PP.BI "WyRet Wy::full_write(WyByteFlow& " "bf" ", const WyStr& " "buf" ", size_t& " "n_written" ")".PP.BI "WyRet Wy::full_write(WyByteFlow& " "bf" ", const WyCSeg& " "buf" ", size_t& " "n_written" ")".PP    Write data of \fIbuf\fP to the system file \fIbf\fP.    The number of written bytes is always stored into \fIn_written\fP.    This function retries a successful \fBwrite(2)\fP until the amount    \fIcount\fP bytes is written..PP    [\fBRet\fP] Ok              Succeed          Wym_EBADF       Object is not valid for the operation          Wym_EINVAL      Object attatched device is not suitable          Wym_EFBIG       Attempt to write beyond the device limit           Wym_EPIPE       Write to a pipe or FIFO with no reader          Wym_EAGAIN      Non-blocking I/O (write would block)          Wym_EINTR       Interrupted by a signal before data written          Wym_ENOSPC      Device left no space for the operation          Wym_EIO         Low level I/O error.PP     [\fBRefer\fP] ::write(int,const void*,size_t).\"--------------------------------------------.PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", const WyStr& " "str" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", WyCSeg " "cseg" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", const char* " "cstr" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", char* " "cstr" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", char " "ch" ")".PP    Write the argument indicated string or char to \fIbf\fP    Note: Implement may actually write several times until the          requested data is fully written or failure encoutered..PP    [\fBThrow\fP] WyByteFlow::Reply            Wym_EBADF   \fIbf\fP is not valid for the operation            Wym_EINVAL  Device is not suitable for writting            Wym_EFBIG   Attempt to write beyond the device limit             Wym_EPIPE   Write to a pipe or FIFO with no reader            Wym_EAGAIN  Non-blocking I/O            Wym_EINTR   Interrupted by a signal            Wym_ENOSPC  Device left no space for the operation            Wym_EIO     I/O error            Wym_EFAULT  \fIcstr\fP is inaccessible.PP     [\fBRet\fP]  Reference of \fIbf\fP.PP     [\fBRefer\fP] WyByteFlow::write(..).\"--------------------------------------------.PP .BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", signed char " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", signed short " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", signed int " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", signed long " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", signed long long " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", unsigned char " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", unsigned short " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", unsigned int " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", unsigned long " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", float " "num" ")".PP.BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", double " "num" ")".PP    Convert \fInum\fP to radix 10 string representation and write to \fIbf\fP    For different radix or number of digits, use wrd(..),     e.g. \fIbf\fP << Wy::wrd(\fInum\fP,16)    Note: Implement may actually write several times until the          requested data is fully written or failure encoutered..PP    [\fBThrow\fP] WyByteFlow::Reply            Wym_EBADF   \fIbf\fP is not valid for the operation            Wym_EFBIG   Attempt to write beyond the device limit             Wym_EINTR   Interrupted by a signal            Wym_EAGAIN  Non-blocking I/O            Wym_EIO     Low level I/O error            Wym_EINVAL  Device is not suitable for writting            Wym_ENOMEM  Not enough memory.PP     [\fBRet\fP] Reference of \fIbf\fP.PP     [\fBRefer\fP] WyByteFlow::write(..).\"--------------------------------------------.PP .BI "WyByteFlow& operator <<(WyByteFlow& " "bf" ", const void* " "p" ")".PP    Convert \fIp\fP to radix 16 string number representation with prefix    "0x" and write to \fIbf\fP    Note: Implement may actually write several times until the          requested data is fully written or failure encoutered..PP    [\fBThrow\fP] WyByteFlow::Reply            Wym_EBADF   \fIbf\fP is not valid for the operation            Wym_EFBIG   Attempt to write beyond the device limit             Wym_EINTR   Interrupted by a signal            Wym_EAGAIN  Non-blocking I/O            Wym_EIO     Low level I/O error            Wym_EINVAL  Device is not suitable for writting            Wym_ENOMEM  Not enough memory.PP     [\fBRet\fP] Reference of \fIbf\fP.PP     [\fBRefer\fP] WyByteFlow::write(..).\"--------------------------------------------.PP.BI "WyByteFlow& operator >>(WyByteFlow& " "bf" ", WyStr& " "str" ")".PP    Read data from \fIbf\fP and store into \fIstr\fP    Note: \fIstr\fP._capacity() is used as the \fIcount\fP argument for the          underlying read function, effect is the actual device           \fIbf\fP dependent..PP    [\fBThrow\fP] WyByteFlow::Reply            Wym_EBADF   \fIbf\fP is not valid for the operation            Wym_EINTR   Interrupted by a signal            Wym_EAGAIN  Non-blocking I/O            Wym_EIO     Low level I/O error            Wym_EINVAL  Device is not suitable for reading            Wym_ENOMEM  Not enough memory.PP     [\fBRet\fP] Reference of \fIbf\fP.          If \fIstr\fP.size()==0, End-of-file is encountered..PP     [\fBRefer\fP] WyByteFlow::read(..).\"--------------------------------------------.PP.BI "WyByteFlow& operator >>(WyByteFlow& " "bf" ", char& " "ch" ")".PP.BI "WyByteFlow& operator >>(WyByteFlow& " "bf" ", unsigned char& " "ch" ")".PP.BI "WyByteFlow& operator >>(WyByteFlow& " "bf" ", signed char& " "ch" ")".PP    Read one character from \fIbf\fP and store into \fIch\fP.PP    [\fBThrow\fP] WyByteFlow::Reply            Wym_EBADF   \fIbf\fP is not valid for the operation            Wym_EINTR   Interrupted by a signal            Wym_EAGAIN  Non-blocking I/O            Wym_EIO     Low level I/O error            Wym_EINVAL  Device is not suitable for reading            Wym_ENOMEM  Not enough memory            Wym_ENOENT* No data read (libwy added).PP     [\fBRet\fP] Reference of \fIbf\fP.PP     [\fBRefer\fP] WyByteFlow::read(..).\"--------------------------------------------.SH "SEE ALSO".BR wy.BR wystr.BR wybyteflow.BR wyregfile.BR wysockfile.BR wyfifofile.BR wyterminal.SH NOTEProject is in development, http://sourceforge.net/projects/libwx

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -