#include <ScriptReturnData.h>
Encapsulates the return data from a scripting request.
- See Also
- IScriptRequestData
| ScriptReturnData::ScriptReturnData | ( | const ScriptID | requestID | ) | |
| explicit |
Use this constructor to represent a successful kMethodRequest (with no return value), kPutPropertyRequest, or kFindCollectionRequest is the ID of the request
Use this constructor to represent a successful kMethodRequest (with a return value), kGetPropertyRequest, or kGetObjectRequest is the ID of the request is the return value
| ScriptReturnData::ScriptReturnData | ( | const ScriptID | requestID, |
| | const ErrorCode | errorCode |
| ) | | |
Use this constructor to represent an unsuccessful request by returning the error code is the ID of the request
- Parameters
| errorCode | is the error code |
| ScriptReturnData::~ScriptReturnData | ( | | ) | |
| inline |
Movable constructor - assumes ownership of the remote part
| void ScriptReturnData::CheckGlobalErrorCode | ( | | ) | |
| protected |
If the global error code is not kSuccess, update the local error code to match and then clear the global error code. This method is called by all constructors.
| ErrorCode ScriptReturnData::GetErrorCode | ( | | ) | const |
| inline |
| PMString ScriptReturnData::GetErrorString | ( | | ) | const |
Retrieve the error string. Looks it up using error string services if none has been set explicitly.
- Returns
- the error string
| ScriptID ScriptReturnData::GetRequestID | ( | | ) | const |
| inline |
| ScriptData ScriptReturnData::GetReturnValue | ( | | ) | const |
| inline |
operator assignment on a movable type takes parameter by value and consumes it
| void ScriptReturnData::SetErrorString | ( | PMString | errorString | ) | |
| inline |
Set an explicit error string
- Parameters
| errorString | is the error string |