Class: Quickfix::IntArray
- Inherits:
-
Object
- Object
- Quickfix::IntArray
- Defined in:
- ext/quickfix/QuickfixRuby.cpp
Class Method Summary collapse
Instance Method Summary collapse
-
#[](*args) ⇒ Object
call-seq: [](index) -> int.
-
#[]=(*args) ⇒ Object
call-seq: []=(index, value).
- #cast(*args) ⇒ Object
- #initialize(*args) ⇒ Object constructor
Constructor Details
#initialize(*args) ⇒ Object
4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 |
# File 'ext/quickfix/QuickfixRuby.cpp', line 4844
SWIGINTERN VALUE
_wrap_new_IntArray(int argc, VALUE *argv, VALUE self) {
size_t arg1 ;
size_t val1 ;
int ecode1 = 0 ;
const char *classname SWIGUNUSED = "Quickfix::IntArray";
IntArray *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","IntArray", 1, argv[0] ));
}
arg1 = static_cast< size_t >(val1);
result = (IntArray *)new_IntArray(arg1);
DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
|
Class Method Details
.frompointer(*args) ⇒ Object
4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 |
# File 'ext/quickfix/QuickfixRuby.cpp', line 4988
SWIGINTERN VALUE
_wrap_IntArray_frompointer(int argc, VALUE *argv, VALUE self) {
int *arg1 = (int *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
IntArray *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_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_int, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "int *","IntArray_frompointer", 1, argv[0] ));
}
arg1 = reinterpret_cast< int * >(argp1);
result = (IntArray *)IntArray_frompointer(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntArray, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
Instance Method Details
#[](*args) ⇒ Object
call-seq:
[](index) -> int
Element accessor/slicing.
4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 |
# File 'ext/quickfix/QuickfixRuby.cpp', line 4886
SWIGINTERN VALUE
_wrap_IntArray___getitem__(int argc, VALUE *argv, VALUE self) {
IntArray *arg1 = (IntArray *) 0 ;
size_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
size_t val2 ;
int ecode2 = 0 ;
int 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_IntArray, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "IntArray *","__getitem__", 1, self ));
}
arg1 = reinterpret_cast< IntArray * >(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 = (int)IntArray___getitem__(arg1,arg2);
vresult = SWIG_From_int(static_cast< int >(result));
return vresult;
fail:
return Qnil;
}
|
#[]=(*args) ⇒ Object
call-seq:
[]=(index, value)
Element setter/slicing.
4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 |
# File 'ext/quickfix/QuickfixRuby.cpp', line 4927
SWIGINTERN VALUE
_wrap_IntArray___setitem__(int argc, VALUE *argv, VALUE self) {
IntArray *arg1 = (IntArray *) 0 ;
size_t arg2 ;
int arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
size_t val2 ;
int ecode2 = 0 ;
int 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_IntArray, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "IntArray *","__setitem__", 1, self ));
}
arg1 = reinterpret_cast< IntArray * >(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_int(argv[1], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","__setitem__", 3, argv[1] ));
}
arg3 = static_cast< int >(val3);
IntArray___setitem__(arg1,arg2,arg3);
return Qnil;
fail:
return Qnil;
}
|
#cast(*args) ⇒ Object
4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 |
# File 'ext/quickfix/QuickfixRuby.cpp', line 4964
SWIGINTERN VALUE
_wrap_IntArray_cast(int argc, VALUE *argv, VALUE self) {
IntArray *arg1 = (IntArray *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int *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_IntArray, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "IntArray *","cast", 1, self ));
}
arg1 = reinterpret_cast< IntArray * >(argp1);
result = (int *)IntArray_cast(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|