Namespaces | Macros | Functions
status_macros.h File Reference
#include "util/status.h"
#include "util/statusor.h"
Include dependency graph for status_macros.h:

Go to the source code of this file.

Namespaces

 util
 

Macros

#define ASSIGN_OR_RETURN(lhs, rexpr)
 
#define ASSIGN_OR_RETURN_IMPL(status, lhs, rexpr)
 
#define RETURN_IF_ERROR(expr)
 
#define STATUS_MACROS_CONCAT_NAME(x, y)   STATUS_MACROS_CONCAT_NAME_INNER(x, y)
 
#define STATUS_MACROS_CONCAT_NAME_INNER(x, y)   x##y
 

Functions

template<typename T >
Status util::DoAssignOrReturn (T &lhs, StatusOr< T > result)
 

Macro Definition Documentation

#define ASSIGN_OR_RETURN (   lhs,
  rexpr 
)
Value:
STATUS_MACROS_CONCAT_NAME(_status_or_value, __COUNTER__), lhs, rexpr);
#define ASSIGN_OR_RETURN_IMPL(status, lhs, rexpr)
Definition: status_macros.h:59
#define STATUS_MACROS_CONCAT_NAME(x, y)
Definition: status_macros.h:49

Definition at line 72 of file status_macros.h.

#define ASSIGN_OR_RETURN_IMPL (   status,
  lhs,
  rexpr 
)
Value:
::util::Status status = DoAssignOrReturn(lhs, (rexpr)); \
if (!status.ok()) return status;
bool ok() const
Definition: status.h:79
Status DoAssignOrReturn(T &lhs, StatusOr< T > result)
Definition: status_macros.h:52

Definition at line 59 of file status_macros.h.

#define RETURN_IF_ERROR (   expr)
Value:
do { \
/* Using _status below to avoid capture problems if expr is "status". */ \
const ::util::Status _status = (expr); \
if (!_status.ok()) return _status; \
} while (0)

Definition at line 40 of file status_macros.h.

#define STATUS_MACROS_CONCAT_NAME (   x,
 
)    STATUS_MACROS_CONCAT_NAME_INNER(x, y)

Definition at line 49 of file status_macros.h.

#define STATUS_MACROS_CONCAT_NAME_INNER (   x,
 
)    x##y

Definition at line 48 of file status_macros.h.



gcloud_speech_utils
Author(s):
autogenerated on Wed Jun 5 2019 21:24:09