Namespaces | Macros | Functions
status_macros.h File Reference
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/status.h>
#include <google/protobuf/stubs/statusor.h>
Include dependency graph for status_macros.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 google
 
 google::protobuf
 
 google::protobuf::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 google::protobuf::util::DoAssignOrReturn (T &lhs, StatusOr< T > result)
 

Macro Definition Documentation

◆ ASSIGN_OR_RETURN

#define ASSIGN_OR_RETURN (   lhs,
  rexpr 
)
Value:
STATUS_MACROS_CONCAT_NAME(_status_or_value, __COUNTER__), lhs, rexpr);

Definition at line 81 of file status_macros.h.

◆ ASSIGN_OR_RETURN_IMPL

#define ASSIGN_OR_RETURN_IMPL (   status,
  lhs,
  rexpr 
)
Value:
Status status = DoAssignOrReturn(lhs, (rexpr)); \
if (PROTOBUF_PREDICT_FALSE(!status.ok())) return status;

Definition at line 68 of file status_macros.h.

◆ RETURN_IF_ERROR

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

Definition at line 49 of file status_macros.h.

◆ STATUS_MACROS_CONCAT_NAME

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

Definition at line 58 of file status_macros.h.

◆ STATUS_MACROS_CONCAT_NAME_INNER

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

Definition at line 57 of file status_macros.h.

google::protobuf::util::DoAssignOrReturn
Status DoAssignOrReturn(T &lhs, StatusOr< T > result)
Definition: status_macros.h:61
ASSIGN_OR_RETURN_IMPL
#define ASSIGN_OR_RETURN_IMPL(status, lhs, rexpr)
Definition: status_macros.h:68
aditof::Status
Status
Status of any operation that the TOF sdk performs.
Definition: status_definitions.h:48
STATUS_MACROS_CONCAT_NAME
#define STATUS_MACROS_CONCAT_NAME(x, y)
Definition: status_macros.h:58


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:04