[Add] process typedef of new struct
This commit is contained in:
parent
374bb478df
commit
27b646a12b
@ -155,6 +155,8 @@ CFutureReqOrderModifyField = {
|
|||||||
"ErrorDescription": "string",
|
"ErrorDescription": "string",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CFutureRspOrderInsertField = CFutureRspOrderModifyField
|
||||||
|
|
||||||
CFutureReqOrderCancelField = {
|
CFutureReqOrderCancelField = {
|
||||||
"UserId": "string",
|
"UserId": "string",
|
||||||
"UserType": "string",
|
"UserType": "string",
|
||||||
@ -597,6 +599,10 @@ CFutureRtnCapitalField = {
|
|||||||
"SellNeedAddMargin": "double",
|
"SellNeedAddMargin": "double",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CFutureRtnOrderField = CFutureRtnPositionField
|
||||||
|
|
||||||
|
CFutureRspTradeField = CFutureRtnTradeField
|
||||||
|
|
||||||
CFutureReqGetQuestionField = {
|
CFutureReqGetQuestionField = {
|
||||||
"Unused": "int",
|
"Unused": "int",
|
||||||
"ErrorDescription": "string",
|
"ErrorDescription": "string",
|
||||||
@ -650,6 +656,8 @@ CFutureQryTotalPositionField = {
|
|||||||
"ErrorDescription": "string",
|
"ErrorDescription": "string",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CFutureRtnOrderField = CFutureRspTotalPositionField
|
||||||
|
|
||||||
CFutureQryStrategyField = {
|
CFutureQryStrategyField = {
|
||||||
"ExchangeNo": "string",
|
"ExchangeNo": "string",
|
||||||
"ErrorDescription": "string",
|
"ErrorDescription": "string",
|
||||||
|
@ -155,6 +155,8 @@ CStockReqOrderModifyField = {
|
|||||||
"ErrorDescription": "string",
|
"ErrorDescription": "string",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CStockRspOrderInsertField = CStockRspOrderModifyField
|
||||||
|
|
||||||
CStockReqOrderCancelField = {
|
CStockReqOrderCancelField = {
|
||||||
"UserId": "string",
|
"UserId": "string",
|
||||||
"UserType": "string",
|
"UserType": "string",
|
||||||
@ -554,6 +556,10 @@ CStockRtnCapitalField = {
|
|||||||
"SellNeedAddMargin": "double",
|
"SellNeedAddMargin": "double",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CStockRspPositionField = CStockRtnPositionField
|
||||||
|
|
||||||
|
CStockRspTradeField = CStockRtnTradeField
|
||||||
|
|
||||||
CStockReqGetQuestionField = {
|
CStockReqGetQuestionField = {
|
||||||
"Unused": "int",
|
"Unused": "int",
|
||||||
"ErrorDescription": "string",
|
"ErrorDescription": "string",
|
||||||
|
@ -54,7 +54,12 @@ class StructGenerator:
|
|||||||
|
|
||||||
def process_typedef(self, line: str):
|
def process_typedef(self, line: str):
|
||||||
"""处理类型定义"""
|
"""处理类型定义"""
|
||||||
print("typdef注意", line) # 一共三行,手动处理
|
line = line.replace("\t", " ")
|
||||||
|
words = line.split(" ")
|
||||||
|
name = words[1]
|
||||||
|
value = words[2]
|
||||||
|
new_line = f"{name} = {value}\n\n"
|
||||||
|
self.f_struct.write(new_line)
|
||||||
|
|
||||||
def process_declare(self, line: str):
|
def process_declare(self, line: str):
|
||||||
"""处理声明"""
|
"""处理声明"""
|
||||||
|
Loading…
Reference in New Issue
Block a user