Flex
Flex exchange system
Public Member Functions | Public Attributes | List of all members
xchg_iterator Class Reference

Tip3/tip3 exchange orders iterator. More...

#include <xchg_iterator.hpp>

Collaboration diagram for xchg_iterator:
Collaboration graph
[legend]

Public Member Functions

 xchg_iterator (process_queue_state &state, orders_queue_cached &orders, uint128 deal_costs, bool sell)
 
bool first_active ()
 Move to the first active order in the queue.
 
OrderInfoXchgWithIdx & cur ()
 
OrderInfoXchgoperator* ()
 
void on_deal (uint128 deal_amount, uint128 costs, uint128 lend_spent)
 When deal is completed.
 
void drop_with_ooc ()
 When order is out-of-evers.
 

Public Attributes

process_queue_statestate_
 Processing orders queue state for PriceXchg.
 
orders_queue_cachedorders_
 Orders queue.
 
uint128 deal_costs_
 Deal processing costs.
 
bool sell_
 Is it a sell order.
 

Detailed Description

Tip3/tip3 exchange orders iterator.

Skips expired and out-of-evers orders. Notifies process_queue_state about such orders.

Constructor & Destructor Documentation

◆ xchg_iterator()

xchg_iterator ( process_queue_state state,
orders_queue_cached orders,
uint128  deal_costs,
bool  sell 
)
inline
Parameters
stateCommon iteration state with calculating message limits
ordersOrders queue
deal_costsDeal costs in evers
sellIs it a sell order

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