#include <ReturnStatus.h>
Public Types | |
| enum | Code { Succeed, Fail, WouldBlock, Timeout, InProgress, NotConnected } |
| Possible status codes. More... | |
Public Methods | |
| ReturnStatus () | |
| Default constructor. vpr::ReturnStatus:;Succeed is default. More... | |
| void | copy (const ReturnStatus &status) |
| Copies the given object into this object. More... | |
| void | setCode (const Code &c) |
| Sets the status code. More... | |
| const Code & | code () const |
| Gets status code. More... | |
| ReturnStatus (const ReturnStatus &status) | |
| copy constructor. More... | |
| ReturnStatus (const Code &c) | |
| ReturnStatus::Code constructor. More... | |
| ReturnStatus & | operator= (const ReturnStatus &status) |
| operator=. More... | |
| ReturnStatus & | operator= (const Code &c) |
| operator=. More... | |
| bool | operator== (const ReturnStatus &status) const |
| operator==. More... | |
| bool | operator== (const Code &c) const |
| operator==. More... | |
| bool | operator!= (const ReturnStatus &status) const |
| operator!=. More... | |
| bool | operator!= (const Code &c) const |
| operator!=. More... | |
| bool | success () const |
| bool | failure () const |
| bool | wouldBlock () const |
| bool | inProgress () const |
| bool | timeout () const |
Definition at line 54 of file ReturnStatus.h.
|
|
Possible status codes.
Definition at line 58 of file ReturnStatus.h.
00059 {
00060 Succeed,
00061 Fail,
00062 WouldBlock,
00063 Timeout,
00064 InProgress,
00065 NotConnected
00066 };
|
|
|
Default constructor. vpr::ReturnStatus:;Succeed is default.
Definition at line 69 of file ReturnStatus.h.
00069 : mReturnStatus( vpr::ReturnStatus::Succeed ) 00070 { 00071 } |
|
|
copy constructor.
Definition at line 104 of file ReturnStatus.h.
00105 {
00106 this->copy( status );
00107 }
|
|
|
ReturnStatus::Code constructor.
Definition at line 110 of file ReturnStatus.h.
00111 {
00112 this->setCode(c);
00113 }
|
|
|
Copies the given object into this object.
Definition at line 80 of file ReturnStatus.h.
00081 {
00082 mReturnStatus = status.mReturnStatus;
00083 }
|
|
|
|
Gets status code.
Definition at line 98 of file ReturnStatus.h.
00099 {
00100 return mReturnStatus;
00101 }
|
|
|
operator=.
Definition at line 120 of file ReturnStatus.h.
00121 {
00122 if((&status) != this)
00123 {
00124 this->copy( status );
00125 }
00126 return *this;
00127 }
|
|
|
operator=.
Definition at line 134 of file ReturnStatus.h.
00135 {
00136 this->setCode(c);
00137 return *this;
00138 }
|
|
|
operator==.
Definition at line 145 of file ReturnStatus.h.
00146 {
00147 return status.mReturnStatus == mReturnStatus;
00148 }
|
|
|
operator==.
Definition at line 155 of file ReturnStatus.h.
00156 {
00157 return c == mReturnStatus;
00158 }
|
|
|
operator!=.
Definition at line 165 of file ReturnStatus.h.
00166 {
00167 return status.mReturnStatus != mReturnStatus;
00168 }
|
|
|
operator!=.
Definition at line 175 of file ReturnStatus.h.
00176 {
00177 return c != mReturnStatus;
00178 }
|
|
|
|
Definition at line 182 of file ReturnStatus.h. References Fail. Referenced by vpr::sim::SocketManager::connect, vpr::InetAddrNSPR::lookupAddress, vpr::SocketAcceptor::open, and vpr::SocketImplBSD::write_i.
00182 { return mReturnStatus == vpr::ReturnStatus::Fail; }
|
|
|
Definition at line 183 of file ReturnStatus.h. References WouldBlock.
00183 { return mReturnStatus == vpr::ReturnStatus::WouldBlock; }
|
|
|
Definition at line 184 of file ReturnStatus.h. References InProgress.
00184 { return mReturnStatus == vpr::ReturnStatus::InProgress; }
|
|
|
Definition at line 185 of file ReturnStatus.h. References Timeout.
00185 { return mReturnStatus == vpr::ReturnStatus::Timeout; }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002