hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_enum_to_string.hpp
Go to the documentation of this file.
1
6
#ifndef IROHA_PROTO_ENUM_TO_STRING_HPP
7
#define IROHA_PROTO_ENUM_TO_STRING_HPP
8
9
#include <string>
10
11
#include <google/protobuf/generated_enum_reflection.h>
12
13
#define IROHA_DEFINE_PROTO_ENUM_TO_STRING(EnumType) \
14
namespace iroha { \
15
namespace to_string { \
16
inline std::string toString(const EnumType &val) { \
17
const ::google::protobuf::EnumDescriptor *const descriptor = \
18
::google::protobuf::GetEnumDescriptor<EnumType>(); \
19
return ::google::protobuf::internal::NameOfEnum(descriptor, val); \
20
} \
21
} \
22
}
23
24
#endif
shared_model
backend
protobuf
proto_enum_to_string.hpp
Generated by
1.8.13