Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::detail::row_validation_helper Struct Reference

#include <snapshot.hpp>

Static Public Member Functions

template<typename T , typename F >
static auto apply (const T &data, F f) -> std::enable_if_t< is_chainbase_object_v< T > >
 
template<typename T , typename F >
static auto apply (const T &, F f) -> std::enable_if_t<!is_chainbase_object_v< T > >
 

Detailed Description

Definition at line 177 of file snapshot.hpp.

Member Function Documentation

◆ apply() [1/2]

template<typename T , typename F >
static auto sysio::chain::detail::row_validation_helper::apply ( const T & ,
F f ) -> std::enable_if_t<!is_chainbase_object_v<T>>
inlinestatic

Definition at line 188 of file snapshot.hpp.

188 {
189 f();
190 }

◆ apply() [2/2]

template<typename T , typename F >
static auto sysio::chain::detail::row_validation_helper::apply ( const T & data,
F f ) -> std::enable_if_t<is_chainbase_object_v<T>>
inlinestatic

Definition at line 179 of file snapshot.hpp.

179 {
180 auto orig = data.id;
181 f();
182 SYS_ASSERT(orig == data.id, snapshot_exception,
183 "Snapshot for ${type} mutates row member \"id\" which is illegal",
184 ("type",boost::core::demangle( typeid( T ).name() )));
185 }
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
Definition exceptions.hpp:7
#define T(meth, val, expected)
Here is the caller graph for this function:

The documentation for this struct was generated from the following file: