📄 wy_repinfo.3wy
字号:
.\".\" Edited by I.J.Wang, 2005.\".TH Wy_RepInfo 3wy "libwy v0.31".SH NAMEWy_RepInfo \- class for information of performed function.SH SYNOPSIS.B #include <wyret.h>.PPWy_RepInfo is an abstract class for the reply information (often preset) thatWyReply can associate to for indicating which function is actually performed.Wy_RepInfo is for inheritage to provide different information to caller functions.Wy_RepInfo object should reside valid, because it can be asychronously referenced.Also, location of Wy_RepInfo object serves for WyReply to identify itself.Note: This class is for inheritage, instances should be declared non-const static to ensure object is compile time allocated. And, be sure object is constructed before accessed..SH "PROTECTED MEMBERS" \fBWy_RepInfo\fP(const char*) throw() \fBWy_RepInfo\fP(int, const char*) throw().SH "PUBLIC MEMBERS" virtual \fB~Wy_RepInfo\fP() throw() int \fBc_repcode\fP(void) const throw() const char* \fBc_repstr\fP(void) const throw() virtual size_t \fBget_reply\fP(char*, size_t) const throw()=0 virtual void \fBset_reply\fP(const char*, size_t) throw()=0.SH "DESCRIPTION".\"--------------------------------------------.PP.BI "Wy_RepInfo(const char* " "cstr" ") throw()".PP Construct reply information object c_repcode() = -1 c_repstr() = \fIcstr\fP.PP Note: The zero-terminated string pointed by \fIcstr\fP should exist constantly throughout program life time Note: If \fIcstr\fP is NULL, behavior undefined (abort).\"--------------------------------------------.PP.BI "Wy_RepInfo(int " "code" ", const char* " "cstr" ") throw()".PP Construct reply information object c_repcode() = \fIcode\fP c_repstr() = \fIcstr\fP.PP Note: The zero-terminated string pointed by \fIcstr\fP should exist constantly throughout program life time Note: If \fIcstr\fP is NULL, behavior undefined (abort).\"--------------------------------------------.PP.BI "virtual ~Wy_RepInfo() throw()".PP Destruct *this.\"--------------------------------------------.PP.BI "int c_repcode(void) const throw()".PP Get the reply code.PP [\fBRet\fP] Reply code.\"--------------------------------------------.PP.BI "const char* c_repstr(void) const throw()".PP Get the reply string pointer *this is constructed with..PP [\fBRet\fP] Pointer to the zero-terminated reply string..\"--------------------------------------------.PP.BI "virtual size_t get_reply(char* " "buf" ", size_t " "blen" ") const throw()=0".PP Get the reply by copying at most \fIblen\fP characters to \fIbuf\fP pointed buffer. The copied reply string is affected by the member \fBset_reply\fP. If \fBset_reply\fP has never been called (also the default defnition of this class), the string pointed by c_repstr() is copied (trailing zero is not copied)..PP [\fBRet\fP] Number of characters copied to \fIbuf\fP. If \fIbuf\fP is NULL, size of the reply string is returned..\"--------------------------------------------.PP.BI "virtual void set_reply(const char* " "data" ", size_t " "dlen" ") const throw()=0".PP Set length \fIdlen\fP of reply string pointed by \fIdata\fP for the member \fBget_reply\fP to use..\"--------------------------------------------.SH "SEE ALSO".BR wyreply.BR wyret.SH NOTEProject is in development, http://sourceforge.net/projects/libwx
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -