|
| | FieldDeserializer (const D &document) |
| |
| template<typename T , typename V , typename B , typename Convert = Convert<V>> |
| auto | deserialize (V B::*member, const std::string &field, Convert transform=Convert()) |
| |
| template<typename V , typename B > |
| auto | Uint (V B::*member, const std::string &field) |
| |
| template<typename V , typename B > |
| auto | Uint64 (V B::*member, const std::string &field) |
| |
| template<typename V , typename B > |
| auto | Bool (V B::*member, const std::string &field) |
| |
| template<typename V , typename B > |
| auto | String (V B::*member, const std::string &field) |
| |
| auto | String (const std::string &field) |
| |
| template<typename V , typename B , typename Convert = Convert<V>> |
| auto | Array (V B::*member, const std::string &field, Convert transform=Convert()) |
| |
| template<typename V , typename B , typename Convert = Convert<V>> |
| auto | Object (V B::*member, const std::string &field, Convert transform=Convert()) |
| |
template<typename D>
struct iroha::model::converters::FieldDeserializer< D >
Functor for deserialization from given document
- Template Parameters
-
template<typename D >
template<typename T , typename V , typename B , typename Convert = Convert<V>>
Create function, which deserializes document field, transforms the value to required type, and assigns it to block member
- Template Parameters
-
| T | - getter return type |
| V | - block member type |
| B | - block type |
| Convert | - transform function type |
- Parameters
-
| member | - pointer to member in block |
| field | - field name for deserialization |
| transform | - transform function from T to V |
- Returns
- function, which takes block, returns block with deserialized member on success, nullopt otherwise