Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
localize.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
fc/variant.hpp
>
4
5
namespace
sysio
{
namespace
client
{
namespace
localize {
6
#if !defined(_)
7
#define _(str) str
8
#endif
9
10
#define localized(str, ...) localized_with_variant((str), fc::mutable_variant_object() __VA_ARGS__ )
11
12
inline
auto
localized_with_variant
(
const
char
* raw_fmt,
const
fc::variant_object
& args) {
13
if
(raw_fmt !=
nullptr
) {
14
try
{
15
return
fc::format_string
(raw_fmt, args);
16
}
catch
(...) {
17
}
18
return
std::string(raw_fmt);
19
}
20
return
std::string();
21
}
22
}}}
fc::variant_object
An order-preserving dictionary of variants.
Definition
variant_object.hpp:21
websocketpp::client< websocketpp::config::asio_client >
variant.hpp
fc::format_string
fc::string format_string(const fc::string &, const variant_object &, bool minimize=false)
Definition
variant.cpp:773
sysio::client::localize::localized_with_variant
auto localized_with_variant(const char *raw_fmt, const fc::variant_object &args)
Definition
localize.hpp:12
sysio
Definition
abi_serializer.cpp:8
programs
clio
localize.hpp
Generated by
1.12.0