class Fox::FXDelegator

Public Class Methods

new(*args) click to toggle source
SWIGINTERN VALUE
_wrap_new_FXDelegator(int argc, VALUE *argv, VALUE self) {
  FXObject *arg1 = (FXObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXDelegator *result = 0 ;
  
  if ((argc < 0) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  if (argc > 0) {
    res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_FXObject, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXObject *","FXDelegator", 1, argv[0] )); 
    }
    arg1 = reinterpret_cast< FXObject * >(argp1);
  }
  {
    result = (FXDelegator *)new_FXDelegator(arg1);
    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
    if(rb_block_given_p()){
      rb_yield(self);
    }
  }
  return self;
fail:
  return Qnil;
}
new(*args, &blk) click to toggle source
# File lib/fox16/kwargs.rb, line 769
def initialize(*args, &blk)
  argument_names = %w{delegate}
  default_params = { :delegate => nil }
  params = {}
  params = args.pop if args.last.is_a? Hash
  args.each_with_index { |e, i| params[argument_names[i].intern] = e }
  params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
  params = default_params.merge(params)
  old_initialize(params[:delegate], &blk)
end
Also aliased as: old_initialize

Public Instance Methods

getDelegate(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXDelegator_getDelegate(int argc, VALUE *argv, VALUE self) {
  FXDelegator *arg1 = (FXDelegator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXObject *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_FXDelegator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXDelegator const *","getDelegate", 1, self )); 
  }
  arg1 = reinterpret_cast< FXDelegator * >(argp1);
  result = (FXObject *)((FXDelegator const *)arg1)->getDelegate();
  {
    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXObject, (void **) &result);
    vresult = FXRbGetRubyObj(result, ty);
  }
  return vresult;
fail:
  return Qnil;
}
load(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXDelegator_load(int argc, VALUE *argv, VALUE self) {
  FXDelegator *arg1 = (FXDelegator *) 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_FXDelegator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXDelegator *","load", 1, self )); 
  }
  arg1 = reinterpret_cast< FXDelegator * >(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);
  FXDelegator_load(arg1,*arg2);
  return Qnil;
fail:
  return Qnil;
}
old_initialize(*args, &blk)
Alias for: new
save(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXDelegator_save(int argc, VALUE *argv, VALUE self) {
  FXDelegator *arg1 = (FXDelegator *) 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_FXDelegator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXDelegator const *","save", 1, self )); 
  }
  arg1 = reinterpret_cast< FXDelegator * >(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);
  FXDelegator_save((FXDelegator const *)arg1,*arg2);
  return Qnil;
fail:
  return Qnil;
}
setDelegate(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXDelegator_setDelegate(int argc, VALUE *argv, VALUE self) {
  FXDelegator *arg1 = (FXDelegator *) 0 ;
  FXObject *arg2 = (FXObject *) 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_FXDelegator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXDelegator *","setDelegate", 1, self )); 
  }
  arg1 = reinterpret_cast< FXDelegator * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","setDelegate", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< FXObject * >(argp2);
  (arg1)->setDelegate(arg2);
  return Qnil;
fail:
  return Qnil;
}