Class: Quickfix::LogFactory

Inherits:
Object
  • Object
show all
Defined in:
ext/quickfix/QuickfixRuby.cpp

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



102532
102533
102534
102535
102536
102537
102538
102539
102540
102541
102542
102543
102544
102545
102546
102547
102548
102549
102550
102551
102552
102553
102554
102555
102556
102557
102558
102559
102560
102561
102562
102563
102564
102565
# File 'ext/quickfix/QuickfixRuby.cpp', line 102532

SWIGINTERN VALUE
_wrap_new_LogFactory(int argc, VALUE *argv, VALUE self) {
  VALUE arg1 = (VALUE) 0 ;
  const char *classname SWIGUNUSED = "Quickfix::LogFactory";
  FIX::LogFactory *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  arg1 = self;
  {
    if(tryRubyException([&]() mutable 
        {
      if ( strcmp(rb_obj_classname(self), classname) != 0 ) {
        /* subclassed */
            result = (FIX::LogFactory *)new SwigDirector_LogFactory(arg1); 
          } else {
        rb_raise(rb_eNameError,"accessing abstract class or protected constructor"); 
            return Qnil;
          }
          
          DATA_PTR(self) = result;
          return self;
        fail:
          return Qnil;
        }) == Qnil) 
    {
      SWIG_fail;
    }
  }
  return self;
fail:
  return Qnil;
}

Instance Method Details

#create(*args, self) ⇒ Object



102420
102421
102422
102423
102424
102425
102426
102427
102428
102429
102430
102431
102432
102433
102434
102435
102436
102437
102438
102439
102440
102441
102442
102443
102444
102445
102446
102447
102448
102449
102450
102451
102452
102453
102454
102455
102456
102457
102458
102459
102460
102461
# File 'ext/quickfix/QuickfixRuby.cpp', line 102420

SWIGINTERN VALUE _wrap_LogFactory_create(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 = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__LogFactory, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_LogFactory_create__SWIG_0(nargs, args, self);
    }
  }
  if (argc == 2) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__LogFactory, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FIX__SessionID, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_LogFactory_create__SWIG_1(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "LogFactory.create", 
    "    FIX::Log LogFactory.create()\n"
    "    FIX::Log * LogFactory.create(FIX::SessionID const &arg0)\n");
  
  return Qnil;
}

#destroy(*args) ⇒ Object



102464
102465
102466
102467
102468
102469
102470
102471
102472
102473
102474
102475
102476
102477
102478
102479
102480
102481
102482
102483
102484
102485
102486
102487
102488
102489
102490
102491
102492
102493
102494
102495
102496
102497
102498
102499
102500
102501
102502
102503
102504
102505
102506
102507
102508
102509
102510
102511
102512
102513
102514
# File 'ext/quickfix/QuickfixRuby.cpp', line 102464

SWIGINTERN VALUE
_wrap_LogFactory_destroy(int argc, VALUE *argv, VALUE self) {
  FIX::LogFactory *arg1 = (FIX::LogFactory *) 0 ;
  FIX::Log *arg2 = (FIX::Log *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  
  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__LogFactory, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::LogFactory *","destroy", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::LogFactory * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FIX__Log, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FIX::Log *","destroy", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< FIX::Log * >(argp2);
  director = dynamic_cast<Swig::Director *>(arg1);
  upcall = (director && (director->swig_get_self() == self));
  try {
    {
      if(tryRubyException([&]() mutable 
          {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("FIX::LogFactory::destroy");
            } else {
          (arg1)->destroy(arg2);
            }
            return self;
          fail:
            return Qnil;
          }) == Qnil) 
      {
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException& e) {
    rb_exc_raise(e.getError());
    SWIG_fail;
  }
  return Qnil;
fail:
  return Qnil;
}