Module: Ofa

Defined in:
ext/ofa.cpp

Class Method Summary collapse

Class Method Details

.create_fingerprint(*args) ⇒ Object



2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
# File 'ext/ofa.cpp', line 2100

SWIGINTERN VALUE
_wrap_create_fingerprint(int argc, VALUE *argv, VALUE self) {
  char *arg1 = (char *) 0 ;
  long arg2 ;
  int arg3 ;
  bool arg4 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  long val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 4) || (argc > 4)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",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 const *","wrap_create_fingerprint", 1, argv[0] ));
  }
  arg1 = reinterpret_cast< char * >(buf1);
  ecode2 = SWIG_AsVal_long(argv[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","wrap_create_fingerprint", 2, argv[1] ));
  } 
  arg2 = static_cast< long >(val2);
  ecode3 = SWIG_AsVal_int(argv[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","wrap_create_fingerprint", 3, argv[2] ));
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_bool(argv[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","wrap_create_fingerprint", 4, argv[3] ));
  } 
  arg4 = static_cast< bool >(val4);
  result = (char *)wrap_create_fingerprint((char const *)arg1,arg2,arg3,arg4);
  vresult = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return vresult;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return Qnil;
}

.version(*args) ⇒ Object



2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
# File 'ext/ofa.cpp', line 2055

SWIGINTERN VALUE
_wrap_version(int argc, VALUE *argv, VALUE self) {
  int *arg1 = (int *) 0 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  int temp1 ;
  int res1 = SWIG_TMPOBJ ;
  int temp2 ;
  int res2 = SWIG_TMPOBJ ;
  int temp3 ;
  int res3 = SWIG_TMPOBJ ;
  VALUE vresult = Qnil;
  
  arg1 = &temp1;
  arg2 = &temp2;
  arg3 = &temp3;
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  ofa_get_version(arg1,arg2,arg3);
  vresult = rb_ary_new();
  if (SWIG_IsTmpObj(res1)) {
    vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg1)));
  } else {
    int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, new_flags));
  }
  if (SWIG_IsTmpObj(res2)) {
    vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
  }
  return vresult;
fail:
  return Qnil;
}