| Xlight API用户手册 v1.6.0.23 Xlight极速柜台接口文档

载入中...
搜索中...
未找到
xlt_quote_decoder.h
浏览该文件的文档.
1#pragma once
2#include "xlt_quote_define.h"
3#include "xlt_quote_struct.h"
4 namespace x1 {
5 typedef union xlt_quote_data_union_t {
6 const xlt_sse_l1_index_t* sse_l1_index;
7 const xlt_sse_l1_snapshot_t* sse_l1_snapshot;
8 const xlt_szse_l1_index_t* szse_l1_index;
9 const xlt_szse_l1_snapshot_t* szse_l1_snapshot;
10 const xlt_szse_l1_snapshot_bond_t* szse_l1_snapshot_bond;
11 }xlt_quote_data_union_t;
12
16 typedef struct XLTQuoteItem {
17 QuoteMsgType data_type;
18 xlt_quote_data_union_t data;
19 }XLTQuoteItem;
20
29 class XLTQuoteDecoder {
30 public:
31 using StepFunc = const XLTQuoteItem* (*)(uint8_t*& data, uint32_t& remain, XLTQuoteItem& item);
32
33 XLTQuoteDecoder(QuoteMCType mc_type, const void* msg_data, uint32_t msg_len);
34 ~XLTQuoteDecoder() = default;
36 XLTQuoteDecoder(const XLTQuoteDecoder&) = delete;
37 XLTQuoteDecoder& operator=(const XLTQuoteDecoder&) = delete;
38
45 const XLTQuoteItem* get_next();
46 protected:
47 StepFunc step_fn_;
48 uint8_t* data_;
49 uint32_t remain_;
50 XLTQuoteItem item_;
51 };
52}
x1::XLTQuoteDecoder
xlight行情解码迭代器
定义 xlt_quote_decoder.h:29
x1::XLTQuoteDecoder::remain_
uint32_t remain_
定义 xlt_quote_decoder.h:49
x1::XLTQuoteDecoder::item_
XLTQuoteItem item_
定义 xlt_quote_decoder.h:50
x1::XLTQuoteDecoder::get_next
const XLTQuoteItem * get_next()
获取下一条解码后的行情数据
x1::XLTQuoteDecoder::StepFunc
const XLTQuoteItem *(*)(uint8_t *&data, uint32_t &remain, XLTQuoteItem &item) StepFunc
定义 xlt_quote_decoder.h:31
x1::XLTQuoteDecoder::operator=
XLTQuoteDecoder & operator=(const XLTQuoteDecoder &)=delete
x1::XLTQuoteDecoder::XLTQuoteDecoder
XLTQuoteDecoder(QuoteMCType mc_type, const void *msg_data, uint32_t msg_len)
x1::XLTQuoteDecoder::step_fn_
StepFunc step_fn_
定义 xlt_quote_decoder.h:47
x1::XLTQuoteDecoder::XLTQuoteDecoder
XLTQuoteDecoder(const XLTQuoteDecoder &)=delete
不可拷贝、不可移动
x1::XLTQuoteDecoder::data_
uint8_t * data_
定义 xlt_quote_decoder.h:48
x1::XLTQuoteDecoder::~XLTQuoteDecoder
~XLTQuoteDecoder()=default
x1
定义 xlt_data_type.h:13
x1::QuoteMsgType
QuoteMsgType
xlight 行情消息类型
定义 xlt_quote_data_type.h:17
x1::QuoteMCType
QuoteMCType
定义 xlt_quote_define.h:5
x1::xlt_quote_data_union_t
union x1::xlt_quote_data_union_t xlt_quote_data_union_t
x1::XLTQuoteItem
struct x1::XLTQuoteItem XLTQuoteItem
get_next 返回的行情数据项
x1::XLTQuoteItem
get_next 返回的行情数据项
定义 xlt_quote_decoder.h:16
x1::XLTQuoteItem::data_type
QuoteMsgType data_type
数据类型，用户根据此字段选择对应结构体解析 data
定义 xlt_quote_decoder.h:17
x1::XLTQuoteItem::data
xlt_quote_data_union_t data
指向解码后数据的指针
定义 xlt_quote_decoder.h:18
x1::xlt_sse_l1_index_t
上交所level1指数行情快照
定义 xlt_quote_struct.h:57
x1::xlt_sse_l1_snapshot_t
上交所level1快照行情
定义 xlt_quote_struct.h:82
x1::xlt_szse_l1_index_t
深交所level1指数快照行情数据结构体
定义 xlt_quote_struct.h:118
x1::xlt_szse_l1_snapshot_bond_t
深交所level1债券快照行情数据结构体
定义 xlt_quote_struct.h:189
x1::xlt_szse_l1_snapshot_t
深交所level1快照行情数据结构体
定义 xlt_quote_struct.h:143
x1::xlt_quote_data_union_t
定义 xlt_quote_decoder.h:5
x1::xlt_quote_data_union_t::sse_l1_index
const xlt_sse_l1_index_t * sse_l1_index
QuoteMsgType::SSE_L1_INDEX 上交所Level1指数
定义 xlt_quote_decoder.h:6
x1::xlt_quote_data_union_t::szse_l1_snapshot
const xlt_szse_l1_snapshot_t * szse_l1_snapshot
QuoteMsgType::SZSE_L1_SNAPSHOT 深交所Level1快照
定义 xlt_quote_decoder.h:9
x1::xlt_quote_data_union_t::sse_l1_snapshot
const xlt_sse_l1_snapshot_t * sse_l1_snapshot
QuoteMsgType::SSE_L1_SNAPSHOT 上交所Level1快照
定义 xlt_quote_decoder.h:7
x1::xlt_quote_data_union_t::szse_l1_index
const xlt_szse_l1_index_t * szse_l1_index
QuoteMsgType::SZSE_L1_INDEX 深交所Level1指数
定义 xlt_quote_decoder.h:8
x1::xlt_quote_data_union_t::szse_l1_snapshot_bond
const xlt_szse_l1_snapshot_bond_t * szse_l1_snapshot_bond
QuoteMsgType::SZSE_L1_BOND_SNAPSHOT 深交所Level1债券快照
定义 xlt_quote_decoder.h:10
xlt_quote_define.h
xlt_quote_struct.h
本文件定义XLT行情数据结构体