Class: OpalKelly::OkCScriptEngine

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

Instance Method Summary collapse

Instance Method Details

#LoadFile(*args) ⇒ Object



24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
# File 'ext/OpalKelly/FrontPanelDLL_wrap.cxx', line 24639

SWIGINTERN VALUE
_wrap_okCScriptEngine_LoadFile(int argc, VALUE *argv, VALUE self) {
  OpalKelly::ScriptEngine *arg1 = (OpalKelly::ScriptEngine *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  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_OpalKelly__ScriptEngine, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OpalKelly::ScriptEngine *","LoadFile", 1, self )); 
  }
  arg1 = reinterpret_cast< OpalKelly::ScriptEngine * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","LoadFile", 2, argv[0] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","LoadFile", 2, argv[0])); 
    }
    arg2 = ptr;
  }
  {
    /*@SWIG:..\FrontPanelDLL\FrontPanelDLL.i,71,okExceptionHandlingCode@*/	try {
      (arg1)->LoadFile((std::string const &)*arg2);
    } catch (const std::exception& e) {
      SWIG_Error(SWIG_RuntimeError, e.what());
      goto fail;
    }
    /*@SWIG@*/
  }
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
}

#LoadScript(*args) ⇒ Object



24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
# File 'ext/OpalKelly/FrontPanelDLL_wrap.cxx', line 24580

SWIGINTERN VALUE
_wrap_okCScriptEngine_LoadScript(int argc, VALUE *argv, VALUE self) {
  OpalKelly::ScriptEngine *arg1 = (OpalKelly::ScriptEngine *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  int res3 = SWIG_OLDOBJ ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OpalKelly__ScriptEngine, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OpalKelly::ScriptEngine *","LoadScript", 1, self )); 
  }
  arg1 = reinterpret_cast< OpalKelly::ScriptEngine * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","LoadScript", 2, argv[0] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","LoadScript", 2, argv[0])); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","LoadScript", 3, argv[1] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","LoadScript", 3, argv[1])); 
    }
    arg3 = ptr;
  }
  {
    /*@SWIG:..\FrontPanelDLL\FrontPanelDLL.i,71,okExceptionHandlingCode@*/	try {
      (arg1)->LoadScript((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (const std::exception& e) {
      SWIG_Error(SWIG_RuntimeError, e.what());
      goto fail;
    }
    /*@SWIG@*/
  }
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return Qnil;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return Qnil;
}

#PrependToScriptPath(*args) ⇒ Object



24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
# File 'ext/OpalKelly/FrontPanelDLL_wrap.cxx', line 24683

SWIGINTERN VALUE
_wrap_okCScriptEngine_PrependToScriptPath(int argc, VALUE *argv, VALUE self) {
  OpalKelly::ScriptEngine *arg1 = (OpalKelly::ScriptEngine *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  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_OpalKelly__ScriptEngine, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OpalKelly::ScriptEngine *","PrependToScriptPath", 1, self )); 
  }
  arg1 = reinterpret_cast< OpalKelly::ScriptEngine * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","PrependToScriptPath", 2, argv[0] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","PrependToScriptPath", 2, argv[0])); 
    }
    arg2 = ptr;
  }
  (arg1)->PrependToScriptPath((std::string const &)*arg2);
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
}

#RunScriptFunction(*args, self) ⇒ Object



24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
# File 'ext/OpalKelly/FrontPanelDLL_wrap.cxx', line 24834

SWIGINTERN VALUE _wrap_okCScriptEngine_RunScriptFunction(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_OpalKelly__ScriptEngine, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_okCScriptEngine_RunScriptFunction__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OpalKelly__ScriptEngine, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< OpalKelly::ScriptValue,std::allocator< OpalKelly::ScriptValue > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_okCScriptEngine_RunScriptFunction__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "RunScriptFunction", 
    "    std::vector< OpalKelly::ScriptValue,std::allocator< OpalKelly::ScriptValue > > RunScriptFunction(std::string const &name, std::vector< OpalKelly::ScriptValue,std::allocator< OpalKelly::ScriptValue > > const &cargs)\n"
    "    std::vector< OpalKelly::ScriptValue,std::allocator< OpalKelly::ScriptValue > > RunScriptFunction(std::string const &name)\n");
  
  return Qnil;
}