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

#include <action.hpp>

Inheritance diagram for sysio::chain::action:
Collaboration diagram for sysio::chain::action:

Public Member Functions

 action ()=default
 
template<typename T , std::enable_if_t< std::is_base_of< bytes, T >::value, int > = 1>
 action (vector< permission_level > auth, const T &value)
 
template<typename T , std::enable_if_t<!std::is_base_of< bytes, T >::value, int > = 1>
 action (vector< permission_level > auth, const T &value)
 
 action (vector< permission_level > auth, account_name account, action_name name, const bytes &data)
 
template<typename T >
T data_as () const
 
- Public Member Functions inherited from sysio::chain::action_base
 action_base ()=default
 
 action_base (account_name acnt, action_name act, const vector< permission_level > &auth)
 
 action_base (account_name acnt, action_name act, vector< permission_level > &&auth)
 

Public Attributes

bytes data
 
- Public Attributes inherited from sysio::chain::action_base
account_name account
 
action_name name
 
vector< permission_levelauthorization
 

Detailed Description

Definition at line 69 of file action.hpp.

Constructor & Destructor Documentation

◆ action() [1/4]

sysio::chain::action::action ( )
default
Here is the caller graph for this function:

◆ action() [2/4]

template<typename T , std::enable_if_t< std::is_base_of< bytes, T >::value, int > = 1>
sysio::chain::action::action ( vector< permission_level > auth,
const T & value )
inline

Definition at line 75 of file action.hpp.

76 : action_base( T::get_account(), T::get_name(), std::move(auth) ) {
77 data.assign(value.data(), value.data() + value.size());
78 }
#define value
Definition pkcs11.h:157

◆ action() [3/4]

template<typename T , std::enable_if_t<!std::is_base_of< bytes, T >::value, int > = 1>
sysio::chain::action::action ( vector< permission_level > auth,
const T & value )
inline

Definition at line 81 of file action.hpp.

82 : action_base( T::get_account(), T::get_name(), std::move(auth) ) {
83 data = fc::raw::pack(value);
84 }
void pack(Stream &s, const std::deque< T > &value)
Definition raw.hpp:531
Here is the call graph for this function:

◆ action() [4/4]

sysio::chain::action::action ( vector< permission_level > auth,
account_name account,
action_name name,
const bytes & data )
inline

Definition at line 86 of file action.hpp.

87 : action_base(account, name, std::move(auth)), data(data) {
88 }

Member Function Documentation

◆ data_as()

template<typename T >
T sysio::chain::action::data_as ( ) const
inline

Definition at line 91 of file action.hpp.

91 {
92 SYS_ASSERT( account == T::get_account(), action_type_exception, "account is not consistent with action struct" );
93 SYS_ASSERT( name == T::get_name(), action_type_exception, "action name is not consistent with action struct" );
94 return fc::raw::unpack<T>(data);
95 }
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
Definition exceptions.hpp:7
void unpack(Stream &s, std::deque< T > &value)
Definition raw.hpp:540
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ data

bytes sysio::chain::action::data

Definition at line 70 of file action.hpp.


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