📄 wyret.3wy
字号:
.\".\" Edited by I.J.Wang, 2004.\".TH WyRet 3wy "libwy v0.31".SH NAMEWyRet \- return type class.SH SYNOPSIS.B #include <wyret.h>.PP[\fBInherit\fP] WyReply.PPWyRet is a discardable class inherited from WyReply with Source Location Imformation(SLI) added, which is forindicating where the object is recorded to return from. SLI is however irrelevantto the object equivalence relation.Functions of this library use WyRetto return function reply, or throw T::\fBReply\fP which is inherited from WyRet andis class T specific.Use macro WY_RETURN(r) to return r with SLI or WY_HERE(r) to set the SLI to wherethe macro is.Or WY_THROW(T) to throw class T that has member set_sli(...) defined,refer to wyret.h (implementation requires T be non-const).SH "PUBLIC MEMBERS" \fBWyRet\fP() throw() \fBWyRet\fP(const WyRet&) throw() \fBWyRet\fP(const WyReply&) throw() explicit \fBWyRet\fP(int) throw() \fBWyRet\fP(WyRet&, Wy::ByMove_t) throw() bool \fBis_default\fP(void) const throw() Wy_RepInfo* \fBoperator->\fP() const throw() void \fBreset\fP(void) throw() void \fBreset\fP(const WyReply&) throw() void \fBreset\fP(const WyRet&) throw() const WyRet& \fBoperator =\fP(const WyReply&) throw() const WyRet& \fBoperator =\fP(const WyRet&) throw() bool \fBoperator ==\fP(const WyRet&) const throw() bool \fBoperator !=\fP(const WyRet&) const throw() bool \fBoperator ==\fP(const WyReply&) const throw() bool \fBoperator !=\fP(const WyReply&) const throw() const Wy_SrcLoc* \fBsli_ptr\fP(void) const throw() const WyRet& \fBset_sli\fP(const Wy_SrcLoc* s) throw().SH "DESCRIPTION".PP.BI "WyRet() throw()".PP Construct default object. The default object contains default reply, no Source Location Information. operator->() = pointer to the predefined Wy_RepInfo object which is unique and inaccessible by name. sli_ptr() = NULL (This is a SLI member).\"--------------------------------------------.PP.BI "WyRet(const WyRet& " "r" ") throw()".PP Construct object by copy from \fIr\fP operator->() = \fIr\fP.operator->() sli_ptr() = \fIr\fP.sli_ptr() (This is a SLI member).\"--------------------------------------------.PP.BI "WyRet(WyReply " "em" ") throw()".PP Construct object by \fIem\fP, no SLI. operator->() = \fIem\fP.operator->() sli_ptr() = NULL (This is a SLI member).\"--------------------------------------------.PP.BI "explicit WyRet(int " "en" ") throw()".PP Construct object to point to the predefined Wy_RepInfo object which is for the errno \fIen\fP. If \fIen\fP is not in the range [0-Wy::_max_errno], default object is constructed. operator->() = pointer to the predefined Wy_RepInfo object for errno \fIen\fP sli_ptr() = NULL (This is a SLI member).\"--------------------------------------------.PP.BI "WyRet(WyRet& " "src" ", Wy::ByMove_t) throw()".PP Make the object \fIsrc\fP accessible at \fIthis\fP pointed address. See Wy_Array(Wy_Array&, Wy::ByMove_t) in wy_array(3wy) for definition of the move constructor..\"--------------------------------------------.PP.BI "bool is_default(void) const throw()".PP Is *this equivalent to the default object.PP Note: Class equivalence does not include SLI..PP [\fBRet\fP] true= object is equivalent to WyRet() false= otherwise.\"--------------------------------------------.PP.BI "Wy_RepInfo* operator->() const throw()".PP Get the Wy_RepInfo object pointer Note: Equivalence relation does not include equivalence of the object from dereferencing operator->()..PP [\fBRet\fP] Wy_RepInfo object pointer of *this.\"--------------------------------------------.PP.BI "void reset(void) throw()".PP Reconstruct *this to the state as WyRet().\"--------------------------------------------.PP.BI "void reset(const WyReply& " "em" ") throw()".PP Reconstruct *this to the state as WyRet(\fIem\fP).\"--------------------------------------------.PP.BI "void reset(const WyRet& " "r" ") throw()".PP Reconstruct *this to the state as WyRet(\fIr\fP).\"--------------------------------------------.PP.BI "const WyRet& operator =(const WyReply& " "em" ") throw()".PP Assign *this by \fIem\fP, no SLI..PP [\fBRet\fP] Const reference of *this.\"--------------------------------------------.PP.BI "const WyRet& operator =(const WyRet& " "r" ") throw()".PP Assign *this to be identical to \fIr\fP (including SLI).PP [\fBRet\fP] Const reference of *this.\"--------------------------------------------.PP.BI "bool operator ==(const WyRet& " "rhs" ") const throw()".PP.BI "bool operator ==(const WyReply& " "rhs" ") const throw()".PP Test equivalence of *this with \fIrhs\fP this->operator==(\fIrhs\fP) yields true iff this->operator->()==\fIrhs\fP.operator->() Note: Equivalence relation does not include equivalence of the object from dereferencing operator->(). Note: Class equivalence does not include SLI..PP [\fBRet\fP] true= *this is equivalent to \fIrhs\fP false= otherwise.\"--------------------------------------------.PP.BI "bool operator !=(const WyRet& " "rhs" ") const throw()".PP.BI "bool operator !=(const WyReply& " "rhs" ") const throw()".PP Test equivalence of *this with \fIrhs\fP this->operator!=(\fIrhs\fP) yields true iff this->operator->()!=\fIrhs\fP.operator->() Note: Equivalence relation does not include equivalence of the object from dereferencing operator->(). Note: Class equivalence does not include SLI..PP [\fBRet\fP] true= *this is not equivalent to \fIrhs\fP false= otherwise.\"--------------------------------------------.PP.BI "const Wy_SrcLoc* sli_ptr(void) const throw()".PP Get the source location object pointer.PP Note: Class equivalence does not include SLI. If WYLIB_CONFIG_NORSLI defined, this member has no effect..PP [\fBRet\fP] Pointer to the source location object (may be zero, NULL).\"--------------------------------------------.PP .BI "const WyRet& set_sli(const Wy_SrcLoc* " "s" ") throw()".PP Set the Source Location Information of *this to refer to \fIs\fP.PP Note: Class equivalence does not include SLI. If WYLIB_CONFIG_NORSLI defined, this member has no effect. Note: The SLI object pointed by \fIs\fP should exist constantly throughtout program life time..PP [\fBRet\fP] Const reference of *this.\"--------------------------------------------.SH "SEE ALSO".BR wyreply.BR wy_repinfo.BR wystr.BR wy.BR wy_thread.BR wychrfile.SH NOTEProject is under development, http://sourceforge.net/projects/libwx
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -