17 #ifndef OBOE_RESULT_WITH_VALUE_H 18 #define OBOE_RESULT_WITH_VALUE_H 20 #include "oboe/Definitions.h" 88 explicit operator bool()
const {
return mError == oboe::Result::OK; }
100 bool operator !()
const {
return mError != oboe::Result::OK; }
124 static_assert(std::is_arithmetic<T>::value,
125 "createBasedOnSign can only be called for numeric types (int or float)");
127 if (numericResult >= 0){
142 template <
typename T>
147 strm << result.
value();
155 #endif //OBOE_RESULT_WITH_VALUE_H T value() const
Definition: ResultWithValue.h:81
ResultWithValue(oboe::Result error)
Definition: ResultWithValue.h:55
static ResultWithValue< T > createBasedOnSign(T numericResult)
Definition: ResultWithValue.h:121
std::ostream & operator<<(std::ostream &strm, const ResultWithValue< T > &result)
Definition: ResultWithValue.h:143
const char * convertToText(FromType input)
oboe::Result error() const
Definition: ResultWithValue.h:73
bool operator !() const
Definition: ResultWithValue.h:100
Result
Definition: Definitions.h:131
ResultWithValue(T value)
Definition: ResultWithValue.h:64
Definition: AudioStream.h:31
Definition: ResultWithValue.h:47