Class: Quickfix::Initiator

Inherits:
Object
  • Object
show all
Defined in:
lib/quickfix_ruby.rb,
ext/quickfix/QuickfixRuby.cpp

Instance Method Summary collapse

Instance Method Details

#block(*args) ⇒ Object



216299
216300
216301
216302
216303
216304
216305
216306
216307
216308
216309
216310
216311
216312
216313
216314
216315
216316
216317
216318
216319
216320
216321
216322
216323
216324
216325
216326
# File 'ext/quickfix/QuickfixRuby.cpp', line 216299

SWIGINTERN VALUE
_wrap_Initiator_block(int argc, VALUE *argv, VALUE self) {
  FIX::Initiator *arg1 = (FIX::Initiator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  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_FIX__Initiator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::Initiator *","block", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::Initiator * >(argp1);
  try {
    (arg1)->block();
  }
  catch(FIX::ConfigError &_e) {
    rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_FIX__ConfigError, SWIG_NewPointerObj((new FIX::ConfigError(static_cast< const FIX::ConfigError& >(_e))),SWIGTYPE_p_FIX__ConfigError,SWIG_POINTER_OWN))); SWIG_fail;
  }
  catch(FIX::RuntimeError &_e) {
    rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_FIX__RuntimeError, SWIG_NewPointerObj((new FIX::RuntimeError(static_cast< const FIX::RuntimeError& >(_e))),SWIGTYPE_p_FIX__RuntimeError,SWIG_POINTER_OWN))); SWIG_fail;
  }
  
  return Qnil;
fail:
  return Qnil;
}

#getApplication(*args) ⇒ Object



216820
216821
216822
216823
216824
216825
216826
216827
216828
216829
216830
216831
216832
216833
216834
216835
216836
216837
216838
216839
216840
216841
216842
216843
216844
216845
216846
216847
# File 'ext/quickfix/QuickfixRuby.cpp', line 216820

SWIGINTERN VALUE
_wrap_Initiator_getApplication(int argc, VALUE *argv, VALUE self) {
  FIX::Initiator *arg1 = (FIX::Initiator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Swig::Director *director = 0;
  FIX::Application *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_FIX__Initiator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::Initiator *","getApplication", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::Initiator * >(argp1);
  result = (FIX::Application *) &(arg1)->getApplication();
  director = dynamic_cast<Swig::Director *>(result);
  if (director) {
    vresult = director->swig_get_self();
  } else {
    vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FIX__Application, 0 |  0 );
  }
  return vresult;
fail:
  return Qnil;
}

#getLog(*args) ⇒ Object



216874
216875
216876
216877
216878
216879
216880
216881
216882
216883
216884
216885
216886
216887
216888
216889
216890
216891
216892
216893
216894
216895
# File 'ext/quickfix/QuickfixRuby.cpp', line 216874

SWIGINTERN VALUE
_wrap_Initiator_getLog(int argc, VALUE *argv, VALUE self) {
  FIX::Initiator *arg1 = (FIX::Initiator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FIX::Log *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_FIX__Initiator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::Initiator *","getLog", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::Initiator * >(argp1);
  result = (FIX::Log *)(arg1)->getLog();
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FIX__Log, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#getMessageStoreFactory(*args) ⇒ Object



216850
216851
216852
216853
216854
216855
216856
216857
216858
216859
216860
216861
216862
216863
216864
216865
216866
216867
216868
216869
216870
216871
# File 'ext/quickfix/QuickfixRuby.cpp', line 216850

SWIGINTERN VALUE
_wrap_Initiator_getMessageStoreFactory(int argc, VALUE *argv, VALUE self) {
  FIX::Initiator *arg1 = (FIX::Initiator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FIX::MessageStoreFactory *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_FIX__Initiator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::Initiator *","getMessageStoreFactory", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::Initiator * >(argp1);
  result = (FIX::MessageStoreFactory *) &(arg1)->getMessageStoreFactory();
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FIX__MessageStoreFactory, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#getSession(*args, self) ⇒ Object



216672
216673
216674
216675
216676
216677
216678
216679
216680
216681
216682
216683
216684
216685
216686
216687
216688
216689
216690
216691
216692
216693
216694
216695
216696
216697
216698
216699
216700
216701
216702
216703
216704
216705
216706
216707
216708
216709
216710
216711
216712
216713
216714
216715
216716
216717
216718
216719
216720
216721
216722
216723
# File 'ext/quickfix/QuickfixRuby.cpp', line 216672

SWIGINTERN VALUE _wrap_Initiator_getSession(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[4];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 4) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__Initiator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FIX__SessionID, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Initiator_getSession__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__Initiator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FIX__SessionID, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Responder, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Initiator_getSession__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "Initiator.getSession", 
    "    FIX::Session Initiator.getSession(FIX::SessionID const &sessionID, Responder &)\n"
    "    FIX::Session * Initiator.getSession(FIX::SessionID const &sessionID)\n");
  
  return Qnil;
}

#getSessions(*args) ⇒ Object



216613
216614
216615
216616
216617
216618
216619
216620
216621
216622
216623
216624
216625
216626
216627
216628
216629
216630
216631
216632
216633
216634
# File 'ext/quickfix/QuickfixRuby.cpp', line 216613

SWIGINTERN VALUE
_wrap_Initiator_getSessions(int argc, VALUE *argv, VALUE self) {
  FIX::Initiator *arg1 = (FIX::Initiator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::set< FIX::SessionID > *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_FIX__Initiator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::Initiator const *","getSessions", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::Initiator * >(argp1);
  result = (std::set< FIX::SessionID > *) &((FIX::Initiator const *)arg1)->getSessions();
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__setT_FIX__SessionID_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#getSessionSettings(*args) ⇒ Object



216726
216727
216728
216729
216730
216731
216732
216733
216734
216735
216736
216737
216738
216739
216740
216741
216742
216743
216744
216745
216746
216747
216748
216749
216750
216751
216752
216753
216754
216755
216756
216757
216758
# File 'ext/quickfix/QuickfixRuby.cpp', line 216726

SWIGINTERN VALUE
_wrap_Initiator_getSessionSettings(int argc, VALUE *argv, VALUE self) {
  FIX::Initiator *arg1 = (FIX::Initiator *) 0 ;
  FIX::SessionID *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  FIX::Dictionary *result = 0 ;
  VALUE vresult = Qnil;
  
  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_FIX__Initiator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::Initiator const *","getSessionSettings", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::Initiator * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FIX__SessionID,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FIX::SessionID const &","getSessionSettings", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FIX::SessionID const &","getSessionSettings", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< FIX::SessionID * >(argp2);
  result = (FIX::Dictionary *)((FIX::Initiator const *)arg1)->getSessionSettings((FIX::SessionID const &)*arg2);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FIX__Dictionary, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#has(*args) ⇒ Object



216761
216762
216763
216764
216765
216766
216767
216768
216769
216770
216771
216772
216773
216774
216775
216776
216777
216778
216779
216780
216781
216782
216783
216784
216785
216786
216787
216788
216789
216790
216791
216792
216793
# File 'ext/quickfix/QuickfixRuby.cpp', line 216761

SWIGINTERN VALUE
_wrap_Initiator_has(int argc, VALUE *argv, VALUE self) {
  FIX::Initiator *arg1 = (FIX::Initiator *) 0 ;
  FIX::SessionID *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  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_FIX__Initiator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::Initiator *","has", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::Initiator * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FIX__SessionID,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FIX::SessionID const &","has", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FIX::SessionID const &","has", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< FIX::SessionID * >(argp2);
  result = (bool)(arg1)->has((FIX::SessionID const &)*arg2);
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#isLoggedOn(*args) ⇒ Object



216543
216544
216545
216546
216547
216548
216549
216550
216551
216552
216553
216554
216555
216556
216557
216558
216559
216560
216561
216562
216563
216564
# File 'ext/quickfix/QuickfixRuby.cpp', line 216543

SWIGINTERN VALUE
_wrap_Initiator_isLoggedOn(int argc, VALUE *argv, VALUE self) {
  FIX::Initiator *arg1 = (FIX::Initiator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool 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_FIX__Initiator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::Initiator *","isLoggedOn", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::Initiator * >(argp1);
  result = (bool)(arg1)->isLoggedOn();
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#isStopped(*args) ⇒ Object



216796
216797
216798
216799
216800
216801
216802
216803
216804
216805
216806
216807
216808
216809
216810
216811
216812
216813
216814
216815
216816
216817
# File 'ext/quickfix/QuickfixRuby.cpp', line 216796

SWIGINTERN VALUE
_wrap_Initiator_isStopped(int argc, VALUE *argv, VALUE self) {
  FIX::Initiator *arg1 = (FIX::Initiator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool 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_FIX__Initiator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::Initiator *","isStopped", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::Initiator * >(argp1);
  result = (bool)(arg1)->isStopped();
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#poll(*args, self) ⇒ Object



216403
216404
216405
216406
216407
216408
216409
216410
216411
216412
216413
216414
216415
216416
216417
216418
216419
216420
216421
216422
216423
216424
216425
216426
216427
216428
216429
216430
216431
216432
216433
216434
216435
216436
216437
216438
216439
216440
216441
216442
216443
216444
216445
# File 'ext/quickfix/QuickfixRuby.cpp', line 216403

SWIGINTERN VALUE _wrap_Initiator_poll(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__Initiator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Initiator_poll__SWIG_1(nargs, args, self);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__Initiator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Initiator_poll__SWIG_0(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "Initiator.poll", 
    "    bool Initiator.poll(double timeout)\n"
    "    bool Initiator.poll()\n");
  
  return Qnil;
}

#start(*args) ⇒ Object



216269
216270
216271
# File 'ext/quickfix/QuickfixRuby.cpp', line 216269

def start
	Thread.new { block() }
end

#stop(*args, self) ⇒ Object



216498
216499
216500
216501
216502
216503
216504
216505
216506
216507
216508
216509
216510
216511
216512
216513
216514
216515
216516
216517
216518
216519
216520
216521
216522
216523
216524
216525
216526
216527
216528
216529
216530
216531
216532
216533
216534
216535
216536
216537
216538
216539
216540
# File 'ext/quickfix/QuickfixRuby.cpp', line 216498

SWIGINTERN VALUE _wrap_Initiator_stop(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 3) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__Initiator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Initiator_stop__SWIG_1(nargs, args, self);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__Initiator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_bool(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Initiator_stop__SWIG_0(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "Initiator.stop", 
    "    void Initiator.stop(bool force)\n"
    "    void Initiator.stop()\n");
  
  return Qnil;
}