Class: Notcurses::ImaxdivT

Inherits:
Object
  • Object
show all
Defined in:
ext/notcurses/src/notcurses_wrap.c,
ext/notcurses/src/notcurses_wrap.c

Overview

Proxy of C Notcurses::ImaxdivT struct

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object

call-seq:

ImaxdivT.new

Class constructor.



3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
# File 'ext/notcurses/src/notcurses_wrap.c', line 3049

SWIGINTERN VALUE
_wrap_new_ImaxdivT(int argc, VALUE *argv, VALUE self) {
  imaxdiv_t *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  result = (imaxdiv_t *)calloc(1, sizeof(imaxdiv_t));
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Instance Method Details

#quot(*args) ⇒ Object

call-seq:

quot -> long

Get value of attribute.



2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
# File 'ext/notcurses/src/notcurses_wrap.c', line 2930

SWIGINTERN VALUE
_wrap_ImaxdivT_quot_get(int argc, VALUE *argv, VALUE self) {
  imaxdiv_t *arg1 = (imaxdiv_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long 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_imaxdiv_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "imaxdiv_t *","quot", 1, self )); 
  }
  arg1 = (imaxdiv_t *)(argp1);
  result = (long) ((arg1)->quot);
  vresult = SWIG_From_long((long)(result));
  return vresult;
fail:
  return Qnil;
}

#quot=(*args) ⇒ Object

call-seq:

quot=(x) -> long

Set new value for attribute.



2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
# File 'ext/notcurses/src/notcurses_wrap.c', line 2901

SWIGINTERN VALUE
_wrap_ImaxdivT_quot_set(int argc, VALUE *argv, VALUE self) {
  imaxdiv_t *arg1 = (imaxdiv_t *) 0 ;
  long arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long val2 ;
  int ecode2 = 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_imaxdiv_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "imaxdiv_t *","quot", 1, self )); 
  }
  arg1 = (imaxdiv_t *)(argp1);
  ecode2 = SWIG_AsVal_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","quot", 2, argv[0] ));
  } 
  arg2 = (long)(val2);
  if (arg1) (arg1)->quot = arg2;
  return Qnil;
fail:
  return Qnil;
}

#rem(*args) ⇒ Object

call-seq:

rem -> long

Get value of attribute.



3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
# File 'ext/notcurses/src/notcurses_wrap.c', line 3001

SWIGINTERN VALUE
_wrap_ImaxdivT_rem_get(int argc, VALUE *argv, VALUE self) {
  imaxdiv_t *arg1 = (imaxdiv_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long 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_imaxdiv_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "imaxdiv_t *","rem", 1, self )); 
  }
  arg1 = (imaxdiv_t *)(argp1);
  result = (long) ((arg1)->rem);
  vresult = SWIG_From_long((long)(result));
  return vresult;
fail:
  return Qnil;
}

#rem=(*args) ⇒ Object

call-seq:

rem=(x) -> long

Set new value for attribute.



2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
# File 'ext/notcurses/src/notcurses_wrap.c', line 2972

SWIGINTERN VALUE
_wrap_ImaxdivT_rem_set(int argc, VALUE *argv, VALUE self) {
  imaxdiv_t *arg1 = (imaxdiv_t *) 0 ;
  long arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long val2 ;
  int ecode2 = 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_imaxdiv_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "imaxdiv_t *","rem", 1, self )); 
  }
  arg1 = (imaxdiv_t *)(argp1);
  ecode2 = SWIG_AsVal_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","rem", 2, argv[0] ));
  } 
  arg2 = (long)(val2);
  if (arg1) (arg1)->rem = arg2;
  return Qnil;
fail:
  return Qnil;
}