|
BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
#include <api_connection.hpp>
Public Member Functions | |
| any_api (api_id_type api_id, const std::shared_ptr< fc::api_connection > &con) | |
| virtual uint64_t | get_handle () const override |
| virtual api_id_type | register_api (api_connection &conn) const override |
Public Member Functions inherited from fc::api_base | |
| api_base () | |
| virtual | ~api_base () |
| template<typename T > | |
| api< T, identity_member_with_optionals > | as () |
| template<typename T > | |
| api< T > | as () |
Public Attributes | |
| api_id_type | _api_id |
| std::weak_ptr< fc::api_connection > | _api_connection |
If api<T> is returned from a remote method, the API is eagerly bound to api<T> of the correct type in api_visitor::from_variant(). This binding [1] needs a reference to the api_connection, which is made available to from_variant() as a parameter.
However, in the case of a remote method which returns api_base which can subsequently be cast by the caller with as<T>, we need to keep track of the connection because the binding is done later (when the client code actually calls as<T>).
[1] The binding actually happens in get_remote_api().
Definition at line 91 of file api_connection.hpp.
|
inline |
Definition at line 94 of file api_connection.hpp.
|
inlineoverridevirtual |
Implements fc::api_base.
Definition at line 97 of file api_connection.hpp.
|
inlineoverridevirtual |
Implements fc::api_base.
Definition at line 100 of file api_connection.hpp.
| std::weak_ptr<fc::api_connection> fc::detail::any_api::_api_connection |
Definition at line 104 of file api_connection.hpp.
| api_id_type fc::detail::any_api::_api_id |
Definition at line 103 of file api_connection.hpp.
1.8.17