📄 wyterminal.3wy
字号:
.\".\" Edited by I.J.Wang, 2004.\".TH WyTerminal 3wy "libwy v0.31".SH NAMEWyTerminal \- handle class of terminal device.SH SYNOPSIS.B #include <wyterminal.h>.PP[\fBInherit\fP] WyChrFile.PPWyTerminal is a handle class for the system terminal device.SH "PUBLIC MEMBERS" class \fBReply\fP : public WyRet \fBWyTerminal\fP() \fBWyTerminal\fP(WyFileHandle) \fBWyTerminal\fP(const WySysFile&) \fBWyTerminal\fP(const char*,int) \fBWyTerminal\fP(const WyStr&,int) \fBWyTerminal\fP(const WyTerminal&) \fBWyTerminal\fP(WyTerminal&, Wy::ByMove_t) throw() virtual \fB~WyTerminal\fP() bool \fBis_default\fP(void) const throw() WyFileHandle \fBfh\fP(void) const throw() WyRet \fBstat\fP(WyFileStat&) const virtual WyRet \fBreset\fP(void) virtual WyRet \fBreset\fP(WyFileHandle) virtual WyRet \fBreset\fP(const WySysFile&) virtual WyRet \fBreset\fP(const char*,int) virtual WyRet \fBreset\fP(const WyStr&,int) virtual WyRet \fB_swap\fP(WySysFile&) throw() virtual WyTerminal* \fB_alloc\fP(WyRet&) const virtual WyRet \fBread\fP(void*,size_t,size_t&) virtual WyRet \fBread\fP(WyStr&,size_t,size_t&) virtual WyRet \fBwrite\fP(const void*,size_t,size_t&) virtual WyRet \fBwrite\fP(WyCSeg,size_t&) virtual WyRet \fBwrite\fP(const WyStr&,size_t&) virtual WyRet \fBdrain\fP(void) virtual WyRet \fBsendbreak\fP(int) virtual WyRet \fBflush\fP(int) virtual WyRet \fBflow\fP(int) virtual WyRet \fBsetattr\fP(const WyTermios&,int) WyRet \fBgetattr\fP(WyTermios&) const WyRet \fBdevname\fP(WyStr&) const.SH "DESCRIPTION".\"--------------------------------------------.PP.BI "class Reply : public WyRet.PP Class specific throw type.\"--------------------------------------------.PP.BI "WyTerminal()".PP Construct default object (refers to nothing) fh()= WyFileHandle().PP [\fBThrow\fP] Reply (reserved).\"--------------------------------------------.PP.BI "WyTerminal(WyFileHandle " "h" ")" .PP Construct object to handle the terminal handled by \fIh\fP fh() = contains file descriptor ::dup from \fIh\fP.PP [\fBThrow\fP] Reply Wym_EBADF \fIh\fP is not valid for the operation Wym_EINTR Interrupted by a signal Wym_EMFILE Too many open fd.PP [\fBRefer\fP] ::dup(int).\"--------------------------------------------.PP.BI "WyTerminal(const WySysFile& " "termf" ")".PP Construct object to handle the terminal handled by \fItermf\fP. fh() = contains file descriptor ::dup from \fItermf\fP.PP [\fBThrow\fP] Reply Wym_EBADF \fItermf\fP is not valid for the operation Wym_EMFILE Too many open devices Wym_ENOMEM Not enough memory.PP [\fBRefer\fP] ::dup(int).\"--------------------------------------------.PP.BI "WyTerminal(const char* " "pathname" ",int " "f" ")" .PP.BI "WyTerminal(const WyStr& " "pathname" ",int " "f" ")" .PP Construct object to handle the terminal pointed by \fIpathname\fP with flags \fIf\fP. \fIf\fP= flags for ::open, except O_CREAT fh() = contains file descriptor from ::open(\fIpathname\fP,\fIf\fP).PP [\fBThrow\fP] Reply Wym_EACCES Search permission is denied Wym_EBADF File is not valid for the operation Wym_EINVAL \fIf\fP invalid Wym_ENAMETOOLONG \fIpathname\fP too long Wym_ENOENT \fIpathname\fP does not exist Wym_ENOTDIR Entry in \fIpathname\fP is not a directory Wym_EMFILE Too many open fd Wym_ENFILE File table overflow Wym_ENOMEM Not enough memory Wym_EEXIST Pathname already exists Wym_EINTR Interrupted by a signal Wym_ENOSPC Device left no space for the operation Wym_ENXIO No such device (device not ready) Wym_EROFS Read-only file system Wym_ENODEV No such device Wym_ELOOP Too many symbolic links encountered ... reply converted from ::open.PP [\fBRefer\fP] ::open(const char*,int).\"--------------------------------------------.PP.BI "WyTerminal(const WyTerminal& " "termf" ")".PP Construct object to handle the terminal handled by \fItermf\fP. fh() = contains file descriptor ::dup from \fItermf\fP.PP [\fBThrow\fP] Reply Wym_EMFILE Too many open devices Wym_ENOMEM Not enough memory.PP [\fBRefer\fP] ::dup(int).\"--------------------------------------------.PP.BI "WyTerminal(WyTerminal& " "src" ", Wy::ByMove_t) throw()".PP See Wy_Array(Wy_Array&, Wy::ByMove_t) in wy_array(3wy) for definition of the move constructor..\"--------------------------------------------.PP.BI "virtual ~WyTerminal()".PP Destruct *this.PP Note: errno from ::close(int) is ignored. Note: This member is non-cancellable..PP [\fBRefer\fP] ::close(int).\"--------------------------------------------.PP.BI "bool is_default(void) const throw()".TP Is *this equivalent to the default object.PP [\fBRet\fP] true= object is equivalent to WyTerminal(). false= otherwise.\"--------------------------------------------.PP.BI "WyFileHandle fh(void) const throw()".TP Get the file handle of *this.PP [\fBRet\fP] file handle which contains the exact file descriptor of *this.\"--------------------------------------------.PP.BI "WyRet stat(WyFileStat& " "filestat" ") const" .PP Reset \fIfilestat\fP with the file information *this associates.PP [\fBRet\fP] Ok Succeed. Wym_EBADF Object is not valid for the operation Wym_ENOMEM Not enough memory ....PP [\fBRefer\fP] ::fstat(int,struct stat*).\"--------------------------------------------.PP.BI "virtual WyRet reset(void)" .PP Reconstruct *this to the state as WyTerminal().PP [\fBRet\fP] Ok Succeed. Wym_EIO low level I/O error Wym_EINTR a signal had occurred ... reply converted from the errno ::close returned Note: Object is always default while returned..PP [\fBRefer\fP] ::close(int).\"--------------------------------------------.PP.BI "virtual WyRet reset(WyFileHandle " "h" ")" .PP Reconstruct *this to the state as WyTerminal(\fIh\fP).PP [\fBRet\fP] Ok Succeed. Wym_EBADF \fIh\fP is not valid for the operation Wym_EMFILE Too many open fd Note: Error report from closing the previously handled object is ignored. Use reset() first if the close return status is desired.PP [\fBRefer\fP] ::dup(int).\"--------------------------------------------.PP.BI "virtual WyRet reset(const WySysFile& " "termf" ")".PP Reconstruct *this to the state as WyTerminal(\fItermf\fP).PP [\fBRet\fP] Ok Succeed. Wym_EBADF \fItermf\fP is not valid for the operation Wym_EMFILE Too many open devices Note: Error report from closing the previously handled object is ignored. Use reset() first if the close return status is desired.PP [\fBRefer\fP] ::dup(int).\"--------------------------------------------.PP.BI "virtual WyRet reset(const char* " "pathname" ",int " "f" ")" .PP.BI "virtual WyRet reset(const WyStr& " "pathname" ",int " "f" ")" .PP Reconstruct *this to the state as WyTerminal(\fIpathname\fP,\fIf\fP) \fIf\fP= flags for ::open, except O_CREAT.PP [\fBRet\fP] Ok Succeed. Wym_EINVAL \fIf\fP invalid Wym_EBADF File is not valid for the operation Wym_EACCES Search permission is denied Wym_ENAMETOOLONG Pathname too long Wym_ENOENT Pathname does not exist Wym_ENOTDIR A component in pathname is not a directory Wym_EMFILE Too many open fd Wym_ENFILE File table overflow Wym_ENOMEM Not enough memory Wym_EEXIST Pathname already exists Wym_EINTR Interrupted by a signal Wym_ENOSPC Device left no space for the operation Wym_ENXIO No such device (device not ready) Wym_EROFS Read-only file system Wym_ENODEV No such device Wym_ELOOP Too many symbolic links encountered ... reply converted from ::open Note: Error report from closing the previously handled object is ignored. Use reset() first if the close return status is desired
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -