?? wyseg.3wy
字號:
.\".\" Edited by I.J.Wang, 2006.\".TH WySeg 3wy "libwy v0.31".SH NAMEWySeg \- class template for indicating the range of an array.SH SYNOPSIS.B #include <wyseg.h>.PPWySeg<T> is a discardable class template for indicatingcontiguous range of Type T elements in an array.Class responsiblity is only for the class itself..SH "PUBLIC MEMBERS" class \fBReply\fP : public WyRet \fBWySeg\fP(const WySeg&) throw() \fBWySeg\fP(T*,size_t) throw(Reply) \fBWySeg\fP(T*,T*) throw(Reply) \fBWySeg\fP(WySeg&, Wy::ByMove_t) throw() T* \fBbegin\fP(void) const throw() T* \fBend\fP(void) const throw() size_t \fBsize\fP(void) const throw() T& \fBoperator []\fP(size_t) const void \fBreset\fP(const WySeg&) throw() WyRet \fBreset\fP(T*,size_t) throw() WyRet \fBreset\fP(T*,T*) throw() T& \fBoperator=\fP(const WySeg&) throw() void \fBswap\fP(WySeg&) throw() WySeg \fBsubseg\fP(size_t) const throw(Reply) WySeg \fBsubseg\fP(size_t,size_t) const throw(Reply) bool \fBis_overlap\fP(const WySeg&) const throw() bool \fBoperator==\fP(const WySeg&) const throw() bool \fBoperator!=\fP(const WySeg&) const throw().SH "DESCRIPTION".\"--------------------------------------------.PP.BI "class Reply : public WyRet.PP Class specific throw type.\"--------------------------------------------.PP.BI "WySeg(const WySeg& " "seg" ") throw()".PP Construct object by copy from \fIseg\fP begin()= \fIcs\fP.begin() size() = \fIcs\fP.size() end() = \fIcs\fP.end().\"--------------------------------------------.PP.BI "WySeg(T* " "buf" ", size_t " "blen" ") throw(Reply)".PP Construct object pointing to the \fIblen\fP contiguous elements pointed by \fIbuf\fP begin()= \fIbuf\fP size() = \fIblen\fP end() = begin()+size().PP [\fBThrow\fP] Reply Wym_EFAULT \fIbuf\fP is NULL.\"--------------------------------------------.PP.BI "WySeg(T* " "head" ", T* " "trail" ") throw(Reply)".PP Construct object pointing to the contiguous elements pointed by \fIhead\fP and the one-past-the-last pointer \fItrail\fP begin()= \fIhead\fP size() = \fItrail\fP-\fIhead\fP end() = \fItrail\fP Note: If \fIhead\fP and \fItrail\fP are not pointing into the same array, behavior is undefined..PP [\fBThrow\fP] Reply Wym_EFAULT \fIhead\fP or \fItrail\fP is NULL Wym_ERANGE \fIhead\fP>\fItrail\fP.\"--------------------------------------------.PP.BI "WySeg(WySeg& " "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 "T* begin(void) const throw()".PP Get the begin pointer of the pointed sub-array.PP [\fBRet\fP] The begin pointer of the pointed sub-array.\"--------------------------------------------.PP.BI "T* end(void) const throw()".PP Get the one-past-the-last pointer of the pointed sub-array For any WySeg<T> object seg, seg.end()==seg.begin()+cseg.size().PP [\fBRet\fP] The one-past-the-last pointer of the pointed sub-array.\"--------------------------------------------.PP.BI "size_t size(void) const throw()".PP Get the number of elements *this points.PP [\fBRet\fP] Number of elements *this points.\"--------------------------------------------.PP.BI "T& operator [](size_t " "idx" ") const".PP Get the element reference of the sub-array at position \fIidx\fP.PP [\fBThrow\fP] Reply Wym_EINVAL \fIidx\fP>=this->size().PP [\fBRet\fP] Element reference at position \fIidx\fP.\"--------------------------------------------.PP.BI "void reset(const WySeg& " "seg" ") throw()".PP Reconstruct *this to the state as WySeg(\fIseg\fP).\"--------------------------------------------.PP.BI "WyRet reset(T* " "buf" ", size_t " "blen" ") throw()".PP Reconstruct *this to the state as WySeg(\fIbuf\fP,\fIblen\fP).PP [\fBRet\fP] Ok Succeed Wym_EFAULT \fIbuf\fP is NULL.\"--------------------------------------------.PP.BI "WyRet reset(T* " "head" ", T* " "trail" ") throw()".PP Reconstruct *this to the state as WySeg(\fIhead\fP,\fItrail\fP) Note: If \fIhead\fP and \fItrail\fP are not pointing into the same array, behavior is undefined..PP [\fBRet\fP] Ok Succeed Wym_EFAULT \fIhead\fP or \fItrail\fP is NULL Wym_ERANGE \fIhead\fP>\fItrail\fP.\"--------------------------------------------.PP.BI "T& operator=(const WySeg& " "seg" ") throw()".PP Reconstruct *this to the state as WySeg(\fIseg\fP).\"--------------------------------------------.PP.BI "void swap(WySeg& " "seg" ") throw()".PP Interchange state of *this with that of \fIseg\fP.\"--------------------------------------------.PP.BI "WySeg subseg(size_t " "idx" ") const throw(Reply)".PP Get sub-array of *this from position \fIidx\fP till the last.PP [\fBThrow\fP] Reply Wym_EINVAL \fIidx\fP>this->size().PP [\fBRet\fP] WySeg pointing to a sub-array of *this.\"--------------------------------------------.PP.BI "WySeg subseg(size_t " "idx" ", size_t " "num" ") const throw(Reply)".PP Get sub-array of *this from position \fIidx\fP, at most \fInum\fP of size.PP [\fBThrow\fP] Reply Wym_EINVAL \fIidx\fP>this->size().PP [\fBRet\fP] WySeg pointing to a sub-array of *this.\"--------------------------------------------.PP.BI "bool is_overlap(const WySeg& " "seg" ") const throw()".PP Test if *this and \fIseg\fP pointed sub-arrays overlap or not Two sub-array \fBa\fP and \fBb\fP overlap iff there exists one element in both the range of \fBa\fP and \fBb\fP..PP [\fBRet\fP] true= sub-arrays overlap false= otherwise.\"--------------------------------------------.PP.BI "bool operator ==(const WySeg& " "rhs" ") const throw()".PP.BI "bool operator !=(const WySeg& " "rhs" ") const throw()".PP Test equivalence of *this with \fIrhs\fP *this==\fIrhs\fP yields true iff both members size() and begin() returns the same value, i.e. this->size()==\fIrhs\fP.size() and this->begin()==\fIrhs\fP.begin().PP [\fBRet\fP] true= relation holds false= otherwise.\"--------------------------------------------.SH "SEE ALSO".BR wyret.BR wystr.BR wy_array.BR wycseg.BR wychrfile.BR wyregfile.BR wymutex.SH NOTEProject is in development, http://sourceforge.net/projects/libwx
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -