Class: Tensorflow::Character

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object


15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
# File 'ext/Tensorflow_wrap.cxx', line 15907

SWIGINTERN VALUE
_wrap_new_Character(int argc, VALUE *argv, VALUE self) {
  size_t arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  Character *result = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_size_t(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","Character", 1, argv[0] ));
  } 
  arg1 = static_cast< size_t >(val1);
  result = (Character *)new_Character(arg1);
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Class Method Details

.frompointer(*args) ⇒ Object


16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
# File 'ext/Tensorflow_wrap.cxx', line 16050

SWIGINTERN VALUE
_wrap_Character_frompointer(int argc, VALUE *argv, VALUE self) {
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  Character *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char *","Character_frompointer", 1, argv[0] ));
  }
  arg1 = reinterpret_cast< char * >(buf1);
  result = (Character *)Character_frompointer(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Character, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return vresult;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return Qnil;
}

Instance Method Details

#[](*args) ⇒ Object

call-seq:

[](index) -> char

Element accessor/slicing.


15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
# File 'ext/Tensorflow_wrap.cxx', line 15948

SWIGINTERN VALUE
_wrap_Character___getitem__(int argc, VALUE *argv, VALUE self) {
  Character *arg1 = (Character *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  char result;
  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_Character, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Character *","__getitem__", 1, self )); 
  }
  arg1 = reinterpret_cast< Character * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","__getitem__", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  result = (char)Character___getitem__(arg1,arg2);
  vresult = SWIG_From_char(static_cast< char >(result));
  return vresult;
fail:
  return Qnil;
}

#[]=(*args) ⇒ Object

call-seq:

[]=(index, value)

Element setter/slicing.


15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
# File 'ext/Tensorflow_wrap.cxx', line 15989

SWIGINTERN VALUE
_wrap_Character___setitem__(int argc, VALUE *argv, VALUE self) {
  Character *arg1 = (Character *) 0 ;
  size_t arg2 ;
  char arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  char val3 ;
  int ecode3 = 0 ;
  
  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_Character, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Character *","__setitem__", 1, self )); 
  }
  arg1 = reinterpret_cast< Character * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","__setitem__", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  ecode3 = SWIG_AsVal_char(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "char","__setitem__", 3, argv[1] ));
  } 
  arg3 = static_cast< char >(val3);
  Character___setitem__(arg1,arg2,arg3);
  return Qnil;
fail:
  return Qnil;
}

#cast(*args) ⇒ Object


16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
# File 'ext/Tensorflow_wrap.cxx', line 16026

SWIGINTERN VALUE
_wrap_Character_cast(int argc, VALUE *argv, VALUE self) {
  Character *arg1 = (Character *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *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_Character, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Character *","cast", 1, self )); 
  }
  arg1 = reinterpret_cast< Character * >(argp1);
  result = (char *)Character_cast(arg1);
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}