hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_status_tools.cpp File Reference
#include "util/proto_status_tools.hpp"
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <optional>
#include "common/bind.hpp"
#include "util/status.hpp"
Include dependency graph for proto_status_tools.cpp:

Namespaces

 iroha
 
 iroha::utility_service
 
 iroha::to_string
 

Macros

#define EL0   (Status::kUnknown, proto::Status_StatusEnum_unknown)
 
#define EL1   (Status::kInitialization, proto::Status_StatusEnum_initialization)
 
#define EL2   (Status::kRunning, proto::Status_StatusEnum_running)
 
#define EL3   (Status::kTermination, proto::Status_StatusEnum_termination)
 
#define EL4   (Status::kStopped, proto::Status_StatusEnum_stopped)
 
#define EL5   (Status::kFailed, proto::Status_StatusEnum_failed)
 
#define NUM_ELEMS   6
 
#define SWL(z, i, ...)
 
#define SWR(z, i, ...)
 
#define SW_ALL_LEFT(v)   switch (v) { BOOST_PP_REPEAT(NUM_ELEMS, SWL, ) }
 
#define SW_ALL_RIGHT(v)   switch (v) { BOOST_PP_REPEAT(NUM_ELEMS, SWR, ) }
 

Functions

proto::Status_StatusEnum iroha::utility_service::makeProtoStatus (Status status)
 
Status iroha::utility_service::makeStatus (const proto::Status_StatusEnum &status)
 
std::string iroha::to_string::toString (const ::iroha::utility_service::Status &val)
 

Macro Definition Documentation

◆ EL0

#define EL0   (Status::kUnknown, proto::Status_StatusEnum_unknown)

◆ EL1

#define EL1   (Status::kInitialization, proto::Status_StatusEnum_initialization)

◆ EL2

#define EL2   (Status::kRunning, proto::Status_StatusEnum_running)

◆ EL3

#define EL3   (Status::kTermination, proto::Status_StatusEnum_termination)

◆ EL4

#define EL4   (Status::kStopped, proto::Status_StatusEnum_stopped)

◆ EL5

#define EL5   (Status::kFailed, proto::Status_StatusEnum_failed)

◆ NUM_ELEMS

#define NUM_ELEMS   6

◆ SW_ALL_LEFT

#define SW_ALL_LEFT (   v)    switch (v) { BOOST_PP_REPEAT(NUM_ELEMS, SWL, ) }

◆ SW_ALL_RIGHT

#define SW_ALL_RIGHT (   v)    switch (v) { BOOST_PP_REPEAT(NUM_ELEMS, SWR, ) }

◆ SWL

#define SWL (   z,
  i,
  ... 
)
Value:
case BOOST_PP_TUPLE_ELEM(2, 0, EL##i): \
return BOOST_PP_TUPLE_ELEM(2, 1, EL##i);

◆ SWR

#define SWR (   z,
  i,
  ... 
)
Value:
case BOOST_PP_TUPLE_ELEM(2, 1, EL##i): \
return BOOST_PP_TUPLE_ELEM(2, 0, EL##i);