警告312:当前不支持嵌套联合(忽略)

时间:2017-08-11 02:59:09

标签: c++ string go swig unions

运行swig接口文件时出现以下警告警告312:当前不支持嵌套联合(忽略)。我能够压制警告。但我需要嵌套联合计算

SWIG版本3.0.12

以下是接口文件(example.swigcxx)

%module(directors="1") example
%header %{
#include "./include/DataType.h"
#include "./include/Struct.h"
#include "./include/InterfaceBase.h"
%}

/* Parse the header files to generate wrappers */
%include "std_string.i"

%feature("director") IGTAQTSCallbackBase;

%include "./include/DataType.h"
%include "./include/Struct.h"
%include "./include/InterfaceBase.h"

struct.h

struct  DCE_BuySellLevelInfo
{
  double              Price;                 
  unsigned long long  Volume;                 
  unsigned long long  ImplyQty;              
};

struct DCEL2_Quotation
{
  int                 TradeDate;                        
  int                 Time;                               
  char                Symbol[SYMBOL_LEN];              
  unsigned int        RoutineNo;    

  unsigned int        MBLQuotBuyNum;    
  union
  {
    DCE_BuySellLevelInfo3     BuyLevel[LEVEL_FIVE];  
    struct  
     {
        double              BuyPrice01;       
        unsigned long long  BuyVolume01;        
        unsigned long long  BidImplyQty01;     
        double              BuyPrice02;      
        unsigned long long  BuyVolume02;    
        unsigned long long  BidImplyQty02;   
     };
   };

  unsigned int                MBLQuotSellNum;      
  union
  {
    DCE_BuySellLevelInfo3    SellLevel[LEVEL_FIVE];     
    struct  
    {
        double              SellPrice01;
        unsigned long long  SellVolume01; 
        unsigned long long  AskImplyQty01;
        double              SellPrice02;  
        unsigned long long  SellVolume02;  
        unsigned long long  AskImplyQty02; 

    };
  };    
  double  Delta;                
};

swig -go -cgo -c ++ -intgosize 64 example.swigcxx

Struct.h:1: Warning 312: Nested union not currently supported (ignored).

0 个答案:

没有答案