Home | History | Annotate | Download | only in hidl

Lines Matching refs:Return

97     // Setting a |status| != OK causes generated code to return |status|
103 int32_t exceptionCode() const { return mException; }
104 const char *exceptionMessage() const { return mMessage.c_str(); }
106 return mException == EX_TRANSACTION_FAILED ? mErrorCode : OK;
109 bool isOk() const { return mException == EX_NONE; }
118 // If |mException| == EX_TRANSACTION_FAILED, generated code will return
132 template<typename T> class Return;
141 friend Return<U> StatusOf(const Return<T> &other);
160 return mStatus.isOk();
174 return dead;
180 return mStatus.description();
185 template<typename T> class Return : public details::return_status {
189 Return(T v) : details::return_status(), mVal{v} {}
190 Return(Status s) : details::return_status(s) {}
195 Return(Return &&other) = default;
196 Return &operator=(Return &&) = default;
198 ~Return() = default;
202 return mVal;
206 return isOk() ? mVal : t;
210 template<typename T> class Return<sp<T>> : public details::return_status {
214 Return(sp<T> v) : details::return_status(), mVal{v} {}
215 Return(T* v) : details::return_status(), mVal{v} {}
217 template<typename U> Return(sp<U> v) : details::return_status(), mVal{v} {}
218 template<typename U> Return(U* v) : details::return_status(), mVal{v} {}
219 Return(Status s) : details::return_status(s) {}
224 Return(Return &&other) = default;
225 Return &operator=(Return &&) = default;
227 ~Return() = default;
231 return mVal;
235 return isOk() ? mVal : t;
240 template<> class Return<void> : public details::return_status {
242 Return() : details::return_status() {}
243 Return(Status s) : details::return_status(s) {}
248 Return(Return &&) = default;
249 Return &operator=(Return &&) = default;
251 ~Return() = default;
254 static inline Return<void> Void() {
255 return Return<void>();
259 // Create a Return<U> from the Status of Return<T>. The provided
260 // Return<T> must have an error status and have it checked.
262 Return<U> StatusOf(const Return<T> &other) {
266 return Return<U>{other.mStatus};