Class: Mykytea::PairVector
- Inherits:
-
Object
- Object
- Mykytea::PairVector
- Defined in:
- ext/mykytea_wrap.cxx
Instance Method Summary collapse
-
#[](*args, self) ⇒ Object
call-seq: [](i, length) -> VALUE [](i) -> VALUE [](i) -> VALUE.
-
#[]=(*args, self) ⇒ Object
call-seq: []=(i, x) -> VALUE []=(i, length, v) -> VALUE.
- #__delete2__(*args) ⇒ Object
-
#assign(*args) ⇒ Object
call-seq: assign(n, x).
-
#at(*args) ⇒ Object
call-seq: at(i) -> VALUE.
-
#back(*args) ⇒ Object
call-seq: back -> Pairsd.
-
#begin(*args) ⇒ Object
call-seq: begin -> std::vector< std::pair< std::string,double > >::iterator.
-
#capacity(*args) ⇒ Object
call-seq: capacity -> std::vector< std::pair< std::string,double > >::size_type.
-
#clear(*args) ⇒ Object
call-seq: clear.
-
#delete_at(*args) ⇒ Object
call-seq: delete_at(i) -> VALUE.
-
#dup(*args) ⇒ Object
call-seq: dup -> PairVector.
-
#each(*args) ⇒ Object
call-seq: each -> PairVector.
-
#empty?(*args) ⇒ Boolean
call-seq: empty? -> bool.
-
#end(*args) ⇒ Object
call-seq: end -> std::vector< std::pair< std::string,double > >::iterator.
-
#erase(*args, self) ⇒ Object
call-seq: erase(pos) -> std::vector< std::pair< std::string,double > >::iterator erase(first, last) -> std::vector< std::pair< std::string,double > >::iterator.
-
#front(*args) ⇒ Object
call-seq: front -> Pairsd.
- #get_allocator(*args) ⇒ Object
- #initialize(*args, self) ⇒ Object constructor
-
#insert(*args, self) ⇒ Object
call-seq: insert(pos, argc) -> PairVector insert(pos, x) -> std::vector< std::pair< std::string,double > >::iterator insert(pos, n, x).
-
#inspect(*args) ⇒ Object
call-seq: inspect -> VALUE.
-
#pop(*args) ⇒ Object
call-seq: pop -> VALUE.
-
#push(*args) ⇒ Object
(also: #<<)
call-seq: push(e) -> Pairsd.
-
#rbegin(*args) ⇒ Object
call-seq: rbegin -> std::vector< std::pair< std::string,double > >::reverse_iterator.
-
#reject(*args) ⇒ Object
call-seq: reject -> PairVector.
-
#reject!(*args) ⇒ Object
(also: #delete_if)
call-seq: reject! -> PairVector.
-
#rend(*args) ⇒ Object
call-seq: rend -> std::vector< std::pair< std::string,double > >::reverse_iterator.
-
#reserve(*args) ⇒ Object
call-seq: reserve(n).
-
#resize(*args, self) ⇒ Object
call-seq: resize(new_size) resize(new_size, x).
-
#select(*args) ⇒ Object
call-seq: select -> PairVector.
-
#shift(*args) ⇒ Object
call-seq: shift -> VALUE.
-
#size(*args) ⇒ Object
call-seq: size -> std::vector< std::pair< std::string,double > >::size_type.
-
#slice(*args) ⇒ Object
call-seq: slice(i, length) -> VALUE.
- #swap(*args) ⇒ Object
-
#to_a(*args) ⇒ Object
call-seq: to_a -> VALUE.
-
#to_s(*args) ⇒ Object
call-seq: to_s -> VALUE.
-
#unshift(*args) ⇒ Object
call-seq: unshift(argc) -> PairVector.
Constructor Details
#initialize(*args, self) ⇒ Object
11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 |
# File 'ext/mykytea_wrap.cxx', line 11364
SWIGINTERN VALUE _wrap_new_PairVector(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[2];
int ii;
argc = nargs;
if (argc > 2) SWIG_fail;
for (ii = 0; (ii < argc); ++ii) {
argv[ii] = args[ii];
}
if (argc == 0) {
return _wrap_new_PairVector__SWIG_0(nargs, args, self);
}
if (argc == 1) {
int _v;
{
int res = SWIG_AsVal_size_t(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_PairVector__SWIG_2(nargs, args, self);
}
}
if (argc == 1) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_PairVector__SWIG_1(nargs, args, self);
}
}
if (argc == 2) {
int _v;
{
int res = SWIG_AsVal_size_t(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = swig::asptr(argv[1], (std::pair< std::string,double >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_PairVector__SWIG_3(nargs, args, self);
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 2, "PairVector.new",
" PairVector.new()\n"
" PairVector.new(std::vector< std::pair< std::string,double > > const &other)\n"
" PairVector.new(std::vector< std::pair< std::string,double > >::size_type size)\n"
" PairVector.new(std::vector< std::pair< std::string,double > >::size_type size, std::vector< std::pair< std::string,double > >::value_type const &value)\n");
return Qnil;
}
|
Instance Method Details
#[](*args, self) ⇒ Object
call-seq:
[](i, length) -> VALUE
[](i) -> VALUE
[](i) -> VALUE
Element accessor/slicing.
10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 |
# File 'ext/mykytea_wrap.cxx', line 10251
SWIGINTERN VALUE _wrap_PairVector___getitem__(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[4];
int ii;
argc = nargs + 1;
argv[0] = self;
if (argc > 4) SWIG_fail;
for (ii = 1; (ii < argc); ++ii) {
argv[ii] = args[ii-1];
}
if (argc == 2) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_PairVector___getitem____SWIG_1(nargs, args, self);
}
}
}
if (argc == 2) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
_v = (argv[1] != 0);
if (_v) {
return _wrap_PairVector___getitem____SWIG_2(nargs, args, self);
}
}
}
if (argc == 3) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_PairVector___getitem____SWIG_0(nargs, args, self);
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 4, "__getitem__",
" VALUE __getitem__(std::vector< std::pair< std::string,double > >::difference_type i, std::vector< std::pair< std::string,double > >::difference_type length)\n"
" VALUE __getitem__(std::vector< std::pair< std::string,double > >::difference_type i)\n"
" VALUE __getitem__(VALUE i)\n");
return Qnil;
}
|
#[]=(*args, self) ⇒ Object
call-seq:
[]=(i, x) -> VALUE
[]=(i, length, v) -> VALUE
Element setter/slicing.
10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 |
# File 'ext/mykytea_wrap.cxx', line 10439
SWIGINTERN VALUE _wrap_PairVector___setitem__(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[5];
int ii;
argc = nargs + 1;
argv[0] = self;
if (argc > 5) SWIG_fail;
for (ii = 1; (ii < argc); ++ii) {
argv[ii] = args[ii-1];
}
if (argc == 3) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = swig::asptr(argv[2], (std::pair< std::string,double >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_PairVector___setitem____SWIG_0(nargs, args, self);
}
}
}
}
if (argc == 4) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = swig::asptr(argv[3], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_PairVector___setitem____SWIG_1(nargs, args, self);
}
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 5, "__setitem__",
" VALUE __setitem__(std::vector< std::pair< std::string,double > >::difference_type i, std::vector< std::pair< std::string,double > >::value_type const &x)\n"
" VALUE __setitem__(std::vector< std::pair< std::string,double > >::difference_type i, std::vector< std::pair< std::string,double > >::difference_type length, std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > const &v)\n");
return Qnil;
}
|
#__delete2__(*args) ⇒ Object
9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 |
# File 'ext/mykytea_wrap.cxx', line 9984
SWIGINTERN VALUE
_wrap_PairVector___delete2__(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
std::vector< std::pair< std::string,double > >::value_type *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 = SWIG_OLDOBJ ;
VALUE 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","__delete2__", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
{
std::pair< std::string,double > *ptr = (std::pair< std::string,double > *)0;
res2 = swig::asptr(argv[0], &ptr);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > >::value_type const &","__delete2__", 2, argv[0] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::pair< std::string,double > >::value_type const &","__delete2__", 2, argv[0]));
}
arg2 = ptr;
}
result = (VALUE)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg____delete2__(arg1,(std::pair< std::string,double > const &)*arg2);
vresult = result;
if (SWIG_IsNewObj(res2)) delete arg2;
return vresult;
fail:
if (SWIG_IsNewObj(res2)) delete arg2;
return Qnil;
}
|
#assign(*args) ⇒ Object
call-seq:
assign(n, x)
Assign a new PairVector or portion of it.
11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 |
# File 'ext/mykytea_wrap.cxx', line 11493
SWIGINTERN VALUE
_wrap_PairVector_assign(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
std::vector< std::pair< std::string,double > >::size_type arg2 ;
std::vector< std::pair< std::string,double > >::value_type *arg3 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
size_t val2 ;
int ecode2 = 0 ;
int res3 = SWIG_OLDOBJ ;
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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","assign", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > >::size_type","assign", 2, argv[0] ));
}
arg2 = static_cast< std::vector< std::pair< std::string,double > >::size_type >(val2);
{
std::pair< std::string,double > *ptr = (std::pair< std::string,double > *)0;
res3 = swig::asptr(argv[1], &ptr);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > >::value_type const &","assign", 3, argv[1] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::pair< std::string,double > >::value_type const &","assign", 3, argv[1]));
}
arg3 = ptr;
}
(arg1)->assign(arg2,(std::vector< std::pair< std::string,double > >::value_type const &)*arg3);
if (SWIG_IsNewObj(res3)) delete arg3;
return Qnil;
fail:
if (SWIG_IsNewObj(res3)) delete arg3;
return Qnil;
}
|
#at(*args) ⇒ Object
call-seq:
at(i) -> VALUE
Return element at a certain index.
10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 |
# File 'ext/mykytea_wrap.cxx', line 10103
SWIGINTERN VALUE
_wrap_PairVector_at(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
std::vector< std::pair< std::string,double > >::difference_type arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
ptrdiff_t val2 ;
int ecode2 = 0 ;
VALUE 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > const *","at", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > >::difference_type","at", 2, argv[0] ));
}
arg2 = static_cast< std::vector< std::pair< std::string,double > >::difference_type >(val2);
result = (VALUE)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__at((std::vector< std::pair< std::string,double > > const *)arg1,arg2);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#back(*args) ⇒ Object
call-seq:
back -> Pairsd
Return the last element in PairVector.
11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 |
# File 'ext/mykytea_wrap.cxx', line 11461
SWIGINTERN VALUE
_wrap_PairVector_back(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double > >::value_type *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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > const *","back", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (std::vector< std::pair< std::string,double > >::value_type *) &((std::vector< std::pair< std::string,double > > const *)arg1)->back();
vresult = swig::from(static_cast< std::pair< std::string,double > >(*result));
return vresult;
fail:
return Qnil;
}
|
#begin(*args) ⇒ Object
call-seq:
begin -> std::vector< std::pair< std::string,double > >::iterator
Return an iterator to the beginning of the PairVector.
10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 |
# File 'ext/mykytea_wrap.cxx', line 10914
SWIGINTERN VALUE
_wrap_PairVector_begin(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double > >::iterator 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","begin", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (arg1)->begin();
vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::pair< std::string,double > >::iterator & >(result),
self),
swig::Iterator::descriptor(),SWIG_POINTER_OWN);
return vresult;
fail:
return Qnil;
}
|
#capacity(*args) ⇒ Object
call-seq:
capacity -> std::vector< std::pair< std::string,double > >::size_type
Reserved capacity of the PairVector.
11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 |
# File 'ext/mykytea_wrap.cxx', line 11896
SWIGINTERN VALUE
_wrap_PairVector_capacity(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double > >::size_type 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > const *","capacity", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = ((std::vector< std::pair< std::string,double > > const *)arg1)->capacity();
vresult = SWIG_From_size_t(static_cast< size_t >(result));
return vresult;
fail:
return Qnil;
}
|
#clear(*args) ⇒ Object
call-seq:
clear
Clear PairVector contents.
11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 |
# File 'ext/mykytea_wrap.cxx', line 11050
SWIGINTERN VALUE
_wrap_PairVector_clear(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","clear", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
(arg1)->clear();
return Qnil;
fail:
return Qnil;
}
|
#delete_at(*args) ⇒ Object
call-seq:
delete_at(i) -> VALUE
Delete an element at a certain index.
10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 |
# File 'ext/mykytea_wrap.cxx', line 10063
SWIGINTERN VALUE
_wrap_PairVector_delete_at(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
std::vector< std::pair< std::string,double > >::difference_type arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
ptrdiff_t val2 ;
int ecode2 = 0 ;
VALUE 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","delete_at", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > >::difference_type","delete_at", 2, argv[0] ));
}
arg2 = static_cast< std::vector< std::pair< std::string,double > >::difference_type >(val2);
result = (VALUE)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__delete_at(arg1,arg2);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#dup(*args) ⇒ Object
call-seq:
dup -> PairVector
Create a duplicate of the class and unfreeze it if needed.
9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 |
# File 'ext/mykytea_wrap.cxx', line 9780
SWIGINTERN VALUE
_wrap_PairVector_dup(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","dup", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__dup(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#each(*args) ⇒ Object
call-seq:
each -> PairVector
Iterate thru each element in the PairVector. A block must be provided.
9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 |
# File 'ext/mykytea_wrap.cxx', line 9960
SWIGINTERN VALUE
_wrap_PairVector_each(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","each", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__each(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
#empty?(*args) ⇒ Boolean
call-seq:
empty? -> bool
Check if the PairVector is empty or not.
10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 |
# File 'ext/mykytea_wrap.cxx', line 10818
SWIGINTERN VALUE
_wrap_PairVector_emptyq___(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
bool 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > const *","empty", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (bool)((std::vector< std::pair< std::string,double > > const *)arg1)->empty();
vresult = SWIG_From_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
|
#end(*args) ⇒ Object
call-seq:
end -> std::vector< std::pair< std::string,double > >::iterator
Return an iterator to past the end of the PairVector.
10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 |
# File 'ext/mykytea_wrap.cxx', line 10948
SWIGINTERN VALUE
_wrap_PairVector_end(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double > >::iterator 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","end", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (arg1)->end();
vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::pair< std::string,double > >::iterator & >(result),
self),
swig::Iterator::descriptor(),SWIG_POINTER_OWN);
return vresult;
fail:
return Qnil;
}
|
#erase(*args, self) ⇒ Object
call-seq:
erase(pos) -> std::vector< std::pair< std::string,double > >::iterator
erase(first, last) -> std::vector< std::pair< std::string,double > >::iterator
Delete a portion of the PairVector.
11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 |
# File 'ext/mykytea_wrap.cxx', line 11259
SWIGINTERN VALUE _wrap_PairVector_erase(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[4];
int ii;
argc = nargs + 1;
argv[0] = self;
if (argc > 4) SWIG_fail;
for (ii = 1; (ii < argc); ++ii) {
argv[ii] = args[ii-1];
}
if (argc == 2) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
swig::ConstIterator *iter = 0;
int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0);
_v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::pair< std::string,double > >::iterator > *>(iter) != 0));
if (_v) {
return _wrap_PairVector_erase__SWIG_0(nargs, args, self);
}
}
}
if (argc == 3) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
swig::ConstIterator *iter = 0;
int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0);
_v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::pair< std::string,double > >::iterator > *>(iter) != 0));
if (_v) {
swig::ConstIterator *iter = 0;
int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0);
_v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::pair< std::string,double > >::iterator > *>(iter) != 0));
if (_v) {
return _wrap_PairVector_erase__SWIG_1(nargs, args, self);
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 4, "erase",
" std::vector< std::pair< std::string,double > >::iterator erase(std::vector< std::pair< std::string,double > >::iterator pos)\n"
" std::vector< std::pair< std::string,double > >::iterator erase(std::vector< std::pair< std::string,double > >::iterator first, std::vector< std::pair< std::string,double > >::iterator last)\n");
return Qnil;
}
|
#front(*args) ⇒ Object
call-seq:
front -> Pairsd
Return the first element in PairVector.
11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 |
# File 'ext/mykytea_wrap.cxx', line 11429
SWIGINTERN VALUE
_wrap_PairVector_front(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double > >::value_type *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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > const *","front", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (std::vector< std::pair< std::string,double > >::value_type *) &((std::vector< std::pair< std::string,double > > const *)arg1)->front();
vresult = swig::from(static_cast< std::pair< std::string,double > >(*result));
return vresult;
fail:
return Qnil;
}
|
#get_allocator(*args) ⇒ Object
11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 |
# File 'ext/mykytea_wrap.cxx', line 11071
SWIGINTERN VALUE
_wrap_PairVector_get_allocator(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
SwigValueWrapper< std::allocator< std::pair< std::string,double > > > 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > const *","get_allocator", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = ((std::vector< std::pair< std::string,double > > const *)arg1)->get_allocator();
vresult = SWIG_NewPointerObj((new std::vector< std::pair< std::string,double > >::allocator_type(static_cast< const std::vector< std::pair< std::string,double > >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_std__string_double_t_t, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#insert(*args, self) ⇒ Object
call-seq:
insert(pos, argc) -> PairVector
insert(pos, x) -> std::vector< std::pair< std::string,double > >::iterator
insert(pos, n, x)
Insert one or more new elements in the PairVector.
11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 |
# File 'ext/mykytea_wrap.cxx', line 11766
SWIGINTERN VALUE _wrap_PairVector_insert(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[5];
int ii;
argc = nargs + 1;
argv[0] = self;
if (argc > 5) SWIG_fail;
for (ii = 1; (ii < argc); ++ii) {
argv[ii] = args[ii-1];
}
if (argc == 3) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
swig::ConstIterator *iter = 0;
int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0);
_v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::pair< std::string,double > >::iterator > *>(iter) != 0));
if (_v) {
int res = swig::asptr(argv[2], (std::pair< std::string,double >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_PairVector_insert__SWIG_1(nargs, args, self);
}
}
}
}
if (argc == 3) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_int(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
if (argc <= 3) {
return _wrap_PairVector_insert__SWIG_0(nargs, args, self);
}
return _wrap_PairVector_insert__SWIG_0(nargs, args, self);
}
}
}
}
if (argc == 4) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
swig::ConstIterator *iter = 0;
int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::Iterator::descriptor(), 0);
_v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< std::pair< std::string,double > >::iterator > *>(iter) != 0));
if (_v) {
{
int res = SWIG_AsVal_size_t(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = swig::asptr(argv[3], (std::pair< std::string,double >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_PairVector_insert__SWIG_2(nargs, args, self);
}
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 5, "insert",
" std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > insert(std::vector< std::pair< std::string,double > >::difference_type pos, int argc, VALUE *argv, ...)\n"
" std::vector< std::pair< std::string,double > >::iterator insert(std::vector< std::pair< std::string,double > >::iterator pos, std::vector< std::pair< std::string,double > >::value_type const &x)\n"
" void insert(std::vector< std::pair< std::string,double > >::iterator pos, std::vector< std::pair< std::string,double > >::size_type n, std::vector< std::pair< std::string,double > >::value_type const &x)\n");
return Qnil;
}
|
#inspect(*args) ⇒ Object
call-seq:
inspect -> VALUE
Inspect class and its contents.
9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 |
# File 'ext/mykytea_wrap.cxx', line 9812
SWIGINTERN VALUE
_wrap_PairVector_inspect(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
VALUE 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","inspect", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (VALUE)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__inspect(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#pop(*args) ⇒ Object
call-seq:
pop -> VALUE
Remove and return element at the end of the PairVector.
10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 |
# File 'ext/mykytea_wrap.cxx', line 10542
SWIGINTERN VALUE
_wrap_PairVector_pop(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
VALUE 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","pop", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (VALUE)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__pop(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#push(*args) ⇒ Object Also known as: <<
call-seq:
push(e) -> Pairsd
Add an element at the end of the PairVector.
10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 |
# File 'ext/mykytea_wrap.cxx', line 10574
SWIGINTERN VALUE
_wrap_PairVector_push(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
std::vector< std::pair< std::string,double > >::value_type *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 = SWIG_OLDOBJ ;
std::vector< std::pair< std::string,double > >::value_type 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","push", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
{
std::pair< std::string,double > *ptr = (std::pair< std::string,double > *)0;
res2 = swig::asptr(argv[0], &ptr);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > >::value_type const &","push", 2, argv[0] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::pair< std::string,double > >::value_type const &","push", 2, argv[0]));
}
arg2 = ptr;
}
result = std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__push(arg1,(std::pair< std::string,double > const &)*arg2);
vresult = swig::from(static_cast< std::pair< std::string,double > >(result));
if (SWIG_IsNewObj(res2)) delete arg2;
return vresult;
fail:
if (SWIG_IsNewObj(res2)) delete arg2;
return Qnil;
}
|
#rbegin(*args) ⇒ Object
call-seq:
rbegin -> std::vector< std::pair< std::string,double > >::reverse_iterator
Return a reverse iterator to the beginning (the end) of the PairVector.
10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 |
# File 'ext/mykytea_wrap.cxx', line 10982
SWIGINTERN VALUE
_wrap_PairVector_rbegin(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double > >::reverse_iterator 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","rbegin", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (arg1)->rbegin();
vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::pair< std::string,double > >::reverse_iterator & >(result),
self),
swig::Iterator::descriptor(),SWIG_POINTER_OWN);
return vresult;
fail:
return Qnil;
}
|
#reject(*args) ⇒ Object
call-seq:
reject -> PairVector
Iterate thru each element in the PairVector and reject those that fail a condition returning a new PairVector. A block must be provided.
10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 |
# File 'ext/mykytea_wrap.cxx', line 10621
SWIGINTERN VALUE
_wrap_PairVector_reject(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","reject", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__reject(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#reject!(*args) ⇒ Object Also known as: delete_if
call-seq:
reject! -> PairVector
Iterate thru each element in the PairVector and reject those that fail a condition. A block must be provided. PairVector is modified in place.
10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 |
# File 'ext/mykytea_wrap.cxx', line 10510
SWIGINTERN VALUE
_wrap_PairVector_rejectN___(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","reject_bang", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__reject_bang(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
#rend(*args) ⇒ Object
call-seq:
rend -> std::vector< std::pair< std::string,double > >::reverse_iterator
Return a reverse iterator to past the end (past the beginning) of the PairVector.
11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 |
# File 'ext/mykytea_wrap.cxx', line 11016
SWIGINTERN VALUE
_wrap_PairVector_rend(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double > >::reverse_iterator 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","rend", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (arg1)->rend();
vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< std::pair< std::string,double > >::reverse_iterator & >(result),
self),
swig::Iterator::descriptor(),SWIG_POINTER_OWN);
return vresult;
fail:
return Qnil;
}
|
#reserve(*args) ⇒ Object
call-seq:
reserve(n)
Reserve memory in the PairVector for a number of elements.
11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 |
# File 'ext/mykytea_wrap.cxx', line 11859
SWIGINTERN VALUE
_wrap_PairVector_reserve(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
std::vector< std::pair< std::string,double > >::size_type arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
size_t 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","reserve", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > >::size_type","reserve", 2, argv[0] ));
}
arg2 = static_cast< std::vector< std::pair< std::string,double > >::size_type >(val2);
(arg1)->reserve(arg2);
return Qnil;
fail:
return Qnil;
}
|
#resize(*args, self) ⇒ Object
call-seq:
resize(new_size)
resize(new_size, x)
Resize the size of the PairVector.
11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 |
# File 'ext/mykytea_wrap.cxx', line 11590
SWIGINTERN VALUE _wrap_PairVector_resize(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[4];
int ii;
argc = nargs + 1;
argv[0] = self;
if (argc > 4) SWIG_fail;
for (ii = 1; (ii < argc); ++ii) {
argv[ii] = args[ii-1];
}
if (argc == 2) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_size_t(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_PairVector_resize__SWIG_0(nargs, args, self);
}
}
}
if (argc == 3) {
int _v;
int res = swig::asptr(argv[0], (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_size_t(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = swig::asptr(argv[2], (std::pair< std::string,double >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_PairVector_resize__SWIG_1(nargs, args, self);
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 4, "PairVector.resize",
" void PairVector.resize(std::vector< std::pair< std::string,double > >::size_type new_size)\n"
" void PairVector.resize(std::vector< std::pair< std::string,double > >::size_type new_size, std::vector< std::pair< std::string,double > >::value_type const &x)\n");
return Qnil;
}
|
#select(*args) ⇒ Object
call-seq:
select -> PairVector
Iterate thru each element in the PairVector and select those that match a condition. A block must be provided.
10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 |
# File 'ext/mykytea_wrap.cxx', line 10031
SWIGINTERN VALUE
_wrap_PairVector_select(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","select", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__select(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#shift(*args) ⇒ Object
call-seq:
shift -> VALUE
Remove and return element at the beginning of the PairVector.
10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 |
# File 'ext/mykytea_wrap.cxx', line 10653
SWIGINTERN VALUE
_wrap_PairVector_shift(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
VALUE 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","shift", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (VALUE)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__shift(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#size(*args) ⇒ Object
call-seq:
size -> std::vector< std::pair< std::string,double > >::size_type
Size or Length of the PairVector.
10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 |
# File 'ext/mykytea_wrap.cxx', line 10850
SWIGINTERN VALUE
_wrap_PairVector_size(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double > >::size_type 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > const *","size", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = ((std::vector< std::pair< std::string,double > > const *)arg1)->size();
vresult = SWIG_From_size_t(static_cast< size_t >(result));
return vresult;
fail:
return Qnil;
}
|
#slice(*args) ⇒ Object
call-seq:
slice(i, length) -> VALUE
Return a slice (portion of) the PairVector.
9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 |
# File 'ext/mykytea_wrap.cxx', line 9908
SWIGINTERN VALUE
_wrap_PairVector_slice(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
std::vector< std::pair< std::string,double > >::difference_type arg2 ;
std::vector< std::pair< std::string,double > >::difference_type arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
ptrdiff_t val2 ;
int ecode2 = 0 ;
ptrdiff_t val3 ;
int ecode3 = 0 ;
VALUE result;
VALUE vresult = Qnil;
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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","slice", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > >::difference_type","slice", 2, argv[0] ));
}
arg2 = static_cast< std::vector< std::pair< std::string,double > >::difference_type >(val2);
ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > >::difference_type","slice", 3, argv[1] ));
}
arg3 = static_cast< std::vector< std::pair< std::string,double > >::difference_type >(val3);
try {
result = (VALUE)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__slice(arg1,arg2,arg3);
} catch(std::invalid_argument &_e) {
SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
}
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#swap(*args) ⇒ Object
10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 |
# File 'ext/mykytea_wrap.cxx', line 10874
SWIGINTERN VALUE
_wrap_PairVector_swap(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
std::vector< std::pair< std::string,double > > *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","swap", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > &","swap", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< std::pair< std::string,double > > &","swap", 2, argv[0]));
}
arg2 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp2);
(arg1)->swap(*arg2);
return Qnil;
fail:
return Qnil;
}
|
#to_a(*args) ⇒ Object
call-seq:
to_a -> VALUE
Convert PairVector to an Array.
9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 |
# File 'ext/mykytea_wrap.cxx', line 9844
SWIGINTERN VALUE
_wrap_PairVector_to_a(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
VALUE 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","to_a", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (VALUE)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__to_a(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#to_s(*args) ⇒ Object
call-seq:
to_s -> VALUE
Convert class to a String representation.
9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 |
# File 'ext/mykytea_wrap.cxx', line 9876
SWIGINTERN VALUE
_wrap_PairVector_to_s(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
VALUE 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_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","to_s", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
result = (VALUE)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__to_s(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#unshift(*args) ⇒ Object
call-seq:
unshift(argc) -> PairVector
Add one or more elements at the beginning of the PairVector.
10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 |
# File 'ext/mykytea_wrap.cxx', line 10734
SWIGINTERN VALUE
_wrap_PairVector_unshift(int argc, VALUE *argv, VALUE self) {
std::vector< std::pair< std::string,double > > *arg1 = (std::vector< std::pair< std::string,double > > *) 0 ;
int arg2 ;
VALUE *arg3 = (VALUE *) 0 ;
void *arg4 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *result = 0 ;
VALUE vresult = Qnil;
if (argc < 1) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< std::pair< std::string,double > > *","unshift", 1, self ));
}
arg1 = reinterpret_cast< std::vector< std::pair< std::string,double > > * >(argp1);
{
arg2 = argc;
arg3 = argv;
}
result = (std::vector< std::pair< std::string,double >,std::allocator< std::pair< std::string,double > > > *)std_vector_Sl_std_pair_Sl_std_string_Sc_double_Sg__Sg__unshift(arg1,arg2,arg3,arg4);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_std__string_double_t_std__allocatorT_std__pairT_std__string_double_t_t_t, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|