Class: Notcurses::NctreeItem

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

Overview

Proxy of C Notcurses::NctreeItem struct

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object

call-seq:

NctreeItem.new

Class constructor.



55290
55291
55292
55293
55294
55295
55296
55297
55298
55299
55300
55301
55302
# File 'ext/notcurses/src/notcurses_wrap.c', line 55290

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

Instance Method Details

#curry(*args) ⇒ Object

call-seq:

curry -> void *

Get value of attribute.



54977
54978
54979
54980
54981
54982
54983
54984
54985
54986
54987
54988
54989
54990
54991
54992
54993
54994
54995
54996
54997
54998
54999
55000
55001
55002
55003
55004
55005
55006
55007
55008
55009
55010
55011
55012
55013
55014
55015
55016
55017
55018
55019
55020
55021
55022
55023
55024
55025
55026
# File 'ext/notcurses/src/notcurses_wrap.c', line 54977

SWIGINTERN VALUE
_wrap_NctreeItem_curry_get(int argc, VALUE *argv, VALUE self) {
  struct nctree_item *arg1 = (struct nctree_item *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *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_nctree_item, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nctree_item *","curry", 1, self )); 
  }
  arg1 = (struct nctree_item *)(argp1);
  result = (void *) ((arg1)->curry);
  {
    VALUE hash = rb_hash_new();
    VALUE obj;
    
    if (strcmp("void *", "void") == 0) {
      obj = Qnil;
    } else {
      obj = SWIG_Ruby_NewPointerObj(result, SWIGTYPE_p_void, 0);
    }
    
    rb_hash_aset(hash, ID2SYM(rb_intern("return")), obj);
    vresult = hash;
  }
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct nctree_item *");
    if (!ty) ty = SWIGTYPE_p_nctree_item;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#curry=(*args) ⇒ Object

call-seq:

curry=(x) -> void *

Set new value for attribute.



54916
54917
54918
54919
54920
54921
54922
54923
54924
54925
54926
54927
54928
54929
54930
54931
54932
54933
54934
54935
54936
54937
54938
54939
54940
54941
54942
54943
54944
54945
54946
54947
54948
54949
54950
54951
54952
54953
54954
54955
54956
54957
54958
54959
54960
54961
54962
54963
54964
54965
54966
54967
54968
54969
54970
54971
54972
54973
54974
# File 'ext/notcurses/src/notcurses_wrap.c', line 54916

SWIGINTERN VALUE
_wrap_NctreeItem_curry_set(int argc, VALUE *argv, VALUE self) {
  struct nctree_item *arg1 = (struct nctree_item *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  VALUE vresult = Qnil;
  
  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_nctree_item, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nctree_item *","curry", 1, self )); 
  }
  arg1 = (struct nctree_item *)(argp1);
  res2 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","curry", 2, argv[0] )); 
  }
  if (arg1) (arg1)->curry = arg2;
  vresult = rb_ary_new();
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct nctree_item *");
    if (!ty) ty = SWIGTYPE_p_nctree_item;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("void *");
    if (!ty) ty = SWIGTYPE_p_void;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg2, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("curry")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#subcount(*args) ⇒ Object

call-seq:

subcount -> unsigned int

Get value of attribute.



55226
55227
55228
55229
55230
55231
55232
55233
55234
55235
55236
55237
55238
55239
55240
55241
55242
55243
55244
55245
55246
55247
55248
55249
55250
55251
55252
55253
55254
55255
55256
55257
55258
55259
55260
55261
55262
55263
# File 'ext/notcurses/src/notcurses_wrap.c', line 55226

SWIGINTERN VALUE
_wrap_NctreeItem_subcount_get(int argc, VALUE *argv, VALUE self) {
  struct nctree_item *arg1 = (struct nctree_item *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int 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_nctree_item, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nctree_item *","subcount", 1, self )); 
  }
  arg1 = (struct nctree_item *)(argp1);
  result = (unsigned int) ((arg1)->subcount);
  vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct nctree_item *");
    if (!ty) ty = SWIGTYPE_p_nctree_item;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#subcount=(*args) ⇒ Object

call-seq:

subcount=(x) -> unsigned int

Set new value for attribute.



55180
55181
55182
55183
55184
55185
55186
55187
55188
55189
55190
55191
55192
55193
55194
55195
55196
55197
55198
55199
55200
55201
55202
55203
55204
55205
55206
55207
55208
55209
55210
55211
55212
55213
55214
55215
55216
55217
55218
55219
55220
55221
55222
55223
# File 'ext/notcurses/src/notcurses_wrap.c', line 55180

SWIGINTERN VALUE
_wrap_NctreeItem_subcount_set(int argc, VALUE *argv, VALUE self) {
  struct nctree_item *arg1 = (struct nctree_item *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  VALUE vresult = Qnil;
  
  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_nctree_item, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nctree_item *","subcount", 1, self )); 
  }
  arg1 = (struct nctree_item *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","subcount", 2, argv[0] ));
  } 
  arg2 = (unsigned int)(val2);
  if (arg1) (arg1)->subcount = arg2;
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct nctree_item *");
    if (!ty) ty = SWIGTYPE_p_nctree_item;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#subs(*args) ⇒ Object

call-seq:

subs -> NctreeItem

Get value of attribute.



55110
55111
55112
55113
55114
55115
55116
55117
55118
55119
55120
55121
55122
55123
55124
55125
55126
55127
55128
55129
55130
55131
55132
55133
55134
55135
55136
55137
55138
55139
55140
55141
55142
55143
55144
55145
55146
55147
55148
55149
55150
55151
55152
55153
55154
55155
55156
55157
55158
55159
# File 'ext/notcurses/src/notcurses_wrap.c', line 55110

SWIGINTERN VALUE
_wrap_NctreeItem_subs_get(int argc, VALUE *argv, VALUE self) {
  struct nctree_item *arg1 = (struct nctree_item *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  struct nctree_item *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_nctree_item, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nctree_item *","subs", 1, self )); 
  }
  arg1 = (struct nctree_item *)(argp1);
  result = (struct nctree_item *) ((arg1)->subs);
  {
    VALUE hash = rb_hash_new();
    VALUE obj;
    
    if (strcmp("struct nctree_item *", "void") == 0) {
      obj = Qnil;
    } else {
      obj = SWIG_Ruby_NewPointerObj(result, SWIGTYPE_p_nctree_item, 0);
    }
    
    rb_hash_aset(hash, ID2SYM(rb_intern("return")), obj);
    vresult = hash;
  }
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct nctree_item *");
    if (!ty) ty = SWIGTYPE_p_nctree_item;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  return vresult;
fail:
  return Qnil;
}

#subs=(*args) ⇒ Object

call-seq:

subs=(x) -> NctreeItem

Set new value for attribute.



55047
55048
55049
55050
55051
55052
55053
55054
55055
55056
55057
55058
55059
55060
55061
55062
55063
55064
55065
55066
55067
55068
55069
55070
55071
55072
55073
55074
55075
55076
55077
55078
55079
55080
55081
55082
55083
55084
55085
55086
55087
55088
55089
55090
55091
55092
55093
55094
55095
55096
55097
55098
55099
55100
55101
55102
55103
55104
55105
55106
55107
# File 'ext/notcurses/src/notcurses_wrap.c', line 55047

SWIGINTERN VALUE
_wrap_NctreeItem_subs_set(int argc, VALUE *argv, VALUE self) {
  struct nctree_item *arg1 = (struct nctree_item *) 0 ;
  struct nctree_item *arg2 = (struct nctree_item *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  VALUE vresult = Qnil;
  
  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_nctree_item, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct nctree_item *","subs", 1, self )); 
  }
  arg1 = (struct nctree_item *)(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_nctree_item, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct nctree_item *","subs", 2, argv[0] )); 
  }
  arg2 = (struct nctree_item *)(argp2);
  if (arg1) (arg1)->subs = arg2;
  vresult = rb_ary_new();
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct nctree_item *");
    if (!ty) ty = SWIGTYPE_p_nctree_item;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg1, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("self")), obj);
  }
  {
    if (vresult == Qnil) {
      vresult = rb_hash_new();
    }
    if (!RB_TYPE_P(vresult, T_HASH)) {
      VALUE temp = rb_hash_new();
      rb_hash_aset(temp, ID2SYM(rb_intern("return")), vresult);
      vresult = temp;
    }
    
    swig_type_info *ty = SWIG_TypeQuery("struct nctree_item *");
    if (!ty) ty = SWIGTYPE_p_nctree_item;
    
    VALUE obj = SWIG_NewPointerObj((void *)arg2, ty, 0);
    rb_hash_aset(vresult, ID2SYM(rb_intern("subs")), obj);
  }
  return vresult;
fail:
  return Qnil;
}