class Fox::FXTranslator

Public Class Methods

new(*args) click to toggle source
SWIGINTERN VALUE
_wrap_new_FXTranslator(int argc, VALUE *argv, VALUE self) {
  FXApp *arg1 = (FXApp *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXTranslator *result = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","FXTranslator", 1, argv[0] )); 
  }
  arg1 = reinterpret_cast< FXApp * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    result = (FXTranslator *)new_FXTranslator(arg1);
    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
    if(rb_block_given_p()){
      rb_yield(self);
    }
  }
  return self;
fail:
  return Qnil;
}

Public Instance Methods

getApp(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXTranslator_getApp(int argc, VALUE *argv, VALUE self) {
  FXTranslator *arg1 = (FXTranslator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXApp *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_FXTranslator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXTranslator const *","getApp", 1, self )); 
  }
  arg1 = reinterpret_cast< FXTranslator * >(argp1);
  result = (FXApp *)((FXTranslator const *)arg1)->getApp();
  {
    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXApp, (void **) &result);
    vresult = FXRbGetRubyObj(result, ty);
  }
  return vresult;
fail:
  return Qnil;
}
getTextCodec(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXTranslator_getTextCodec(int argc, VALUE *argv, VALUE self) {
  FXTranslator *arg1 = (FXTranslator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXTextCodec *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_FXTranslator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXTranslator const *","getTextCodec", 1, self )); 
  }
  arg1 = reinterpret_cast< FXTranslator * >(argp1);
  result = (FXTextCodec *)((FXTranslator const *)arg1)->getTextCodec();
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXTextCodec, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
load(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXTranslator_load(int argc, VALUE *argv, VALUE self) {
  FXTranslator *arg1 = (FXTranslator *) 0 ;
  FXStream *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 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_FXTranslator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXTranslator *","load", 1, self )); 
  }
  arg1 = reinterpret_cast< FXTranslator * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","load", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","load", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< FXStream * >(argp2);
  FXTranslator_load(arg1,*arg2);
  return Qnil;
fail:
  return Qnil;
}
save(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXTranslator_save(int argc, VALUE *argv, VALUE self) {
  FXTranslator *arg1 = (FXTranslator *) 0 ;
  FXStream *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 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_FXTranslator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXTranslator const *","save", 1, self )); 
  }
  arg1 = reinterpret_cast< FXTranslator * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","save", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","save", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< FXStream * >(argp2);
  FXTranslator_save((FXTranslator const *)arg1,*arg2);
  return Qnil;
fail:
  return Qnil;
}
setTextCodec(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXTranslator_setTextCodec(int argc, VALUE *argv, VALUE self) {
  FXTranslator *arg1 = (FXTranslator *) 0 ;
  FXTextCodec *arg2 = (FXTextCodec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 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_FXTranslator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXTranslator *","setTextCodec", 1, self )); 
  }
  arg1 = reinterpret_cast< FXTranslator * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXTextCodec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXTextCodec *","setTextCodec", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< FXTextCodec * >(argp2);
  (arg1)->setTextCodec(arg2);
  return Qnil;
fail:
  return Qnil;
}
tr(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXTranslator_tr(int argc, VALUE *argv, VALUE self) {
  FXTranslator *arg1 = (FXTranslator *) 0 ;
  FXchar *arg2 = (FXchar *) 0 ;
  FXchar *arg3 = (FXchar *) 0 ;
  FXchar *arg4 = (FXchar *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXchar *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXTranslator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXTranslator const *","tr", 1, self )); 
  }
  arg1 = reinterpret_cast< FXTranslator * >(argp1);
  arg2 = NIL_P(argv[0]) ? 0 : StringValuePtr(argv[0]);
  arg3 = NIL_P(argv[1]) ? 0 : StringValuePtr(argv[1]);
  if (argc > 2) {
    arg4 = NIL_P(argv[2]) ? 0 : StringValuePtr(argv[2]);
  }
  result = (FXchar *)FXTranslator_tr((FXTranslator const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}