Class: Ctp::CThostFtdcPositionProfitAlgorithmField

Inherits:
Object
  • Object
show all
Defined in:
ext/ctp/ctp.cxx

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



102885
102886
102887
102888
102889
102890
102891
102892
102893
102894
102895
102896
102897
102898
# File 'ext/ctp/ctp.cxx', line 102885

SWIGINTERN VALUE
_wrap_new_CThostFtdcPositionProfitAlgorithmField(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "Ctp::CThostFtdcPositionProfitAlgorithmField";
  CThostFtdcPositionProfitAlgorithmField *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  result = (CThostFtdcPositionProfitAlgorithmField *)new CThostFtdcPositionProfitAlgorithmField();
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Instance Method Details

#AccountID(*args) ⇒ Object



102667
102668
102669
102670
102671
102672
102673
102674
102675
102676
102677
102678
102679
102680
102681
102682
102683
102684
102685
102686
102687
102688
102689
102690
102691
102692
102693
102694
# File 'ext/ctp/ctp.cxx', line 102667

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_AccountID_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","AccountID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  result = (char *) ((arg1)->AccountID);
  {
    size_t size = SWIG_strnlen(result, 13);
    
    
    
    vresult = SWIG_FromCharPtrAndSize(result, size);
  }
  return vresult;
fail:
  return Qnil;
}

#AccountID=(*args) ⇒ Object



102637
102638
102639
102640
102641
102642
102643
102644
102645
102646
102647
102648
102649
102650
102651
102652
102653
102654
102655
102656
102657
102658
102659
102660
102661
102662
102663
102664
# File 'ext/ctp/ctp.cxx', line 102637

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_AccountID_set(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[13] ;
  int res2 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","AccountID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  res2 = SWIG_AsCharArray(argv[0], temp2, 13);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [13]","AccountID", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(temp2);
  if (arg2) memcpy(arg1->AccountID,arg2,13*sizeof(char));
  else memset(arg1->AccountID,0,13*sizeof(char));
  return Qnil;
fail:
  return Qnil;
}

#Algorithm(*args) ⇒ Object



102726
102727
102728
102729
102730
102731
102732
102733
102734
102735
102736
102737
102738
102739
102740
102741
102742
102743
102744
102745
102746
102747
# File 'ext/ctp/ctp.cxx', line 102726

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_Algorithm_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  TThostFtdcAlgorithmType result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","Algorithm", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  result = (TThostFtdcAlgorithmType) ((arg1)->Algorithm);
  vresult = SWIG_From_char(static_cast< char >(result));
  return vresult;
fail:
  return Qnil;
}

#Algorithm=(*args) ⇒ Object



102697
102698
102699
102700
102701
102702
102703
102704
102705
102706
102707
102708
102709
102710
102711
102712
102713
102714
102715
102716
102717
102718
102719
102720
102721
102722
102723
# File 'ext/ctp/ctp.cxx', line 102697

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_Algorithm_set(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  TThostFtdcAlgorithmType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","Algorithm", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  ecode2 = SWIG_AsVal_char(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcAlgorithmType","Algorithm", 2, argv[0] ));
  } 
  arg2 = static_cast< TThostFtdcAlgorithmType >(val2);
  if (arg1) (arg1)->Algorithm = arg2;
  return Qnil;
fail:
  return Qnil;
}

#BrokerID(*args) ⇒ Object



102607
102608
102609
102610
102611
102612
102613
102614
102615
102616
102617
102618
102619
102620
102621
102622
102623
102624
102625
102626
102627
102628
102629
102630
102631
102632
102633
102634
# File 'ext/ctp/ctp.cxx', line 102607

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_BrokerID_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","BrokerID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  result = (char *) ((arg1)->BrokerID);
  {
    size_t size = SWIG_strnlen(result, 11);
    
    
    
    vresult = SWIG_FromCharPtrAndSize(result, size);
  }
  return vresult;
fail:
  return Qnil;
}

#BrokerID=(*args) ⇒ Object



102577
102578
102579
102580
102581
102582
102583
102584
102585
102586
102587
102588
102589
102590
102591
102592
102593
102594
102595
102596
102597
102598
102599
102600
102601
102602
102603
102604
# File 'ext/ctp/ctp.cxx', line 102577

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_BrokerID_set(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[11] ;
  int res2 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","BrokerID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  res2 = SWIG_AsCharArray(argv[0], temp2, 11);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [11]","BrokerID", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(temp2);
  if (arg2) memcpy(arg1->BrokerID,arg2,11*sizeof(char));
  else memset(arg1->BrokerID,0,11*sizeof(char));
  return Qnil;
fail:
  return Qnil;
}

#CurrencyID(*args) ⇒ Object



102840
102841
102842
102843
102844
102845
102846
102847
102848
102849
102850
102851
102852
102853
102854
102855
102856
102857
102858
102859
102860
102861
102862
102863
102864
102865
102866
102867
# File 'ext/ctp/ctp.cxx', line 102840

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_CurrencyID_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","CurrencyID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  result = (char *) ((arg1)->CurrencyID);
  {
    size_t size = SWIG_strnlen(result, 4);
    
    
    
    vresult = SWIG_FromCharPtrAndSize(result, size);
  }
  return vresult;
fail:
  return Qnil;
}

#CurrencyID=(*args) ⇒ Object



102810
102811
102812
102813
102814
102815
102816
102817
102818
102819
102820
102821
102822
102823
102824
102825
102826
102827
102828
102829
102830
102831
102832
102833
102834
102835
102836
102837
# File 'ext/ctp/ctp.cxx', line 102810

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_CurrencyID_set(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[4] ;
  int res2 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","CurrencyID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  res2 = SWIG_AsCharArray(argv[0], temp2, 4);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [4]","CurrencyID", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(temp2);
  if (arg2) memcpy(arg1->CurrencyID,arg2,4*sizeof(char));
  else memset(arg1->CurrencyID,0,4*sizeof(char));
  return Qnil;
fail:
  return Qnil;
}

#Memo(*args) ⇒ Object



102780
102781
102782
102783
102784
102785
102786
102787
102788
102789
102790
102791
102792
102793
102794
102795
102796
102797
102798
102799
102800
102801
102802
102803
102804
102805
102806
102807
# File 'ext/ctp/ctp.cxx', line 102780

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_Memo_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","Memo", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  result = (char *) ((arg1)->Memo);
  {
    size_t size = SWIG_strnlen(result, 161);
    
    
    
    vresult = SWIG_FromCharPtrAndSize(result, size);
  }
  return vresult;
fail:
  return Qnil;
}

#Memo=(*args) ⇒ Object



102750
102751
102752
102753
102754
102755
102756
102757
102758
102759
102760
102761
102762
102763
102764
102765
102766
102767
102768
102769
102770
102771
102772
102773
102774
102775
102776
102777
# File 'ext/ctp/ctp.cxx', line 102750

SWIGINTERN VALUE
_wrap_CThostFtdcPositionProfitAlgorithmField_Memo_set(int argc, VALUE *argv, VALUE self) {
  CThostFtdcPositionProfitAlgorithmField *arg1 = (CThostFtdcPositionProfitAlgorithmField *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[161] ;
  int res2 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcPositionProfitAlgorithmField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcPositionProfitAlgorithmField *","Memo", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcPositionProfitAlgorithmField * >(argp1);
  res2 = SWIG_AsCharArray(argv[0], temp2, 161);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [161]","Memo", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(temp2);
  if (arg2) memcpy(arg1->Memo,arg2,161*sizeof(char));
  else memset(arg1->Memo,0,161*sizeof(char));
  return Qnil;
fail:
  return Qnil;
}