Class: Mykytea::Pairsd
- Inherits:
-
Object
- Object
- Mykytea::Pairsd
- Defined in:
- ext/mykytea_wrap.cxx
Instance Method Summary collapse
-
#[](*args) ⇒ Object
call-seq: [](index) -> VALUE.
-
#[]=(*args) ⇒ Object
call-seq: []=(index, obj) -> VALUE.
-
#first(*args) ⇒ Object
call-seq: first -> std::string.
-
#first=(*args) ⇒ Object
call-seq: first=(x) -> std::string.
- #initialize(*args, self) ⇒ Object constructor
-
#inspect(*args) ⇒ Object
call-seq: inspect -> VALUE.
-
#second(*args) ⇒ Object
call-seq: second -> double.
-
#second=(*args) ⇒ Object
call-seq: second=(x) -> double.
-
#to_s(*args) ⇒ Object
call-seq: to_s -> VALUE.
Constructor Details
#initialize(*args, self) ⇒ Object
9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 |
# File 'ext/mykytea_wrap.cxx', line 9435
SWIGINTERN VALUE _wrap_new_Pairsd(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_Pairsd__SWIG_0(nargs, args, self);
}
if (argc == 1) {
int _v;
int res = swig::asptr(argv[0], (std::pair< std::string,double >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_Pairsd__SWIG_2(nargs, args, self);
}
}
if (argc == 2) {
int _v;
int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_double(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_Pairsd__SWIG_1(nargs, args, self);
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 2, "Pairsd.new",
" Pairsd.new()\n"
" Pairsd.new(std::string first, double second)\n"
" Pairsd.new(std::pair< std::string,double > const &other)\n");
return Qnil;
}
|
Instance Method Details
#[](*args) ⇒ Object
call-seq:
[](index) -> VALUE
Element accessor/slicing.
9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 |
# File 'ext/mykytea_wrap.cxx', line 9692
SWIGINTERN VALUE
_wrap_Pairsd___getitem__(int argc, VALUE *argv, VALUE self) {
std::pair< std::string,double > *arg1 = (std::pair< std::string,double > *) 0 ;
int arg2 ;
int res1 ;
int 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::asptr( self, &arg1 );
if (!SWIG_IsOK(res1))
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::pair< std::string,double > *","__getitem__", 1, self ));
}
ecode2 = SWIG_AsVal_int(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","__getitem__", 2, argv[0] ));
}
arg2 = static_cast< int >(val2);
result = (VALUE)std_pair_Sl_std_string_Sc_double_Sg____getitem__(arg1,arg2);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#[]=(*args) ⇒ Object
call-seq:
[]=(index, obj) -> VALUE
Element setter/slicing.
9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 |
# File 'ext/mykytea_wrap.cxx', line 9731
SWIGINTERN VALUE
_wrap_Pairsd___setitem__(int argc, VALUE *argv, VALUE self) {
std::pair< std::string,double > *arg1 = (std::pair< std::string,double > *) 0 ;
int arg2 ;
VALUE arg3 = (VALUE) 0 ;
int res1 ;
int val2 ;
int ecode2 = 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::asptr( self, &arg1 );
if (!SWIG_IsOK(res1))
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::pair< std::string,double > *","__setitem__", 1, self ));
}
ecode2 = SWIG_AsVal_int(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","__setitem__", 2, argv[0] ));
}
arg2 = static_cast< int >(val2);
arg3 = argv[1];
result = (VALUE)std_pair_Sl_std_string_Sc_double_Sg____setitem__(arg1,arg2,arg3);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#first(*args) ⇒ Object
call-seq:
first -> std::string
Return the first element in Pairsd.
9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 |
# File 'ext/mykytea_wrap.cxx', line 9532
SWIGINTERN VALUE
_wrap_Pairsd_first_get(int argc, VALUE *argv, VALUE self) {
std::pair< std::string,double > *arg1 = (std::pair< std::string,double > *) 0 ;
int res1 ;
std::string *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::asptr( self, &arg1 );
if (!SWIG_IsOK(res1))
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::pair< std::string,double > *","first", 1, self ));
}
result = (std::string *) & ((arg1)->first);
vresult = SWIG_From_std_string(static_cast< std::string >(*result));
return vresult;
fail:
return Qnil;
}
|
#first=(*args) ⇒ Object
call-seq:
first=(x) -> std::string
Return the first element in Pairsd.
9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 |
# File 'ext/mykytea_wrap.cxx', line 9497
SWIGINTERN VALUE
_wrap_Pairsd_first_set(int argc, VALUE *argv, VALUE self) {
std::pair< std::string,double > *arg1 = (std::pair< std::string,double > *) 0 ;
std::string *arg2 = 0 ;
int res1 ;
int res2 = SWIG_OLDOBJ ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
res1 = swig::asptr( self, &arg1 );
if (!SWIG_IsOK(res1))
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::pair< std::string,double > *","first", 1, self ));
}
{
std::string *ptr = (std::string *)0;
res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","first", 2, argv[0] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","first", 2, argv[0]));
}
arg2 = ptr;
}
if (arg1) (arg1)->first = *arg2;
if (SWIG_IsNewObj(res2)) delete arg2;
return Qnil;
fail:
if (SWIG_IsNewObj(res2)) delete arg2;
return Qnil;
}
|
#inspect(*args) ⇒ Object
call-seq:
inspect -> VALUE
Inspect class and its contents.
9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 |
# File 'ext/mykytea_wrap.cxx', line 9630
SWIGINTERN VALUE
_wrap_Pairsd_inspect(int argc, VALUE *argv, VALUE self) {
std::pair< std::string,double > *arg1 = (std::pair< std::string,double > *) 0 ;
int res1 ;
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::asptr( self, &arg1 );
if (!SWIG_IsOK(res1))
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::pair< std::string,double > const *","inspect", 1, self ));
}
result = (VALUE)std_pair_Sl_std_string_Sc_double_Sg__inspect((std::pair< std::string,double > const *)arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#second(*args) ⇒ Object
call-seq:
second -> double
Return the second element in Pairsd.
9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 |
# File 'ext/mykytea_wrap.cxx', line 9599
SWIGINTERN VALUE
_wrap_Pairsd_second_get(int argc, VALUE *argv, VALUE self) {
std::pair< std::string,double > *arg1 = (std::pair< std::string,double > *) 0 ;
int res1 ;
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::asptr( self, &arg1 );
if (!SWIG_IsOK(res1))
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::pair< std::string,double > *","second", 1, self ));
}
result = (double) ((arg1)->second);
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#second=(*args) ⇒ Object
call-seq:
second=(x) -> double
Return the second element in Pairsd.
9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 |
# File 'ext/mykytea_wrap.cxx', line 9571
SWIGINTERN VALUE
_wrap_Pairsd_second_set(int argc, VALUE *argv, VALUE self) {
std::pair< std::string,double > *arg1 = (std::pair< std::string,double > *) 0 ;
double arg2 ;
int res1 ;
double val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
res1 = swig::asptr( self, &arg1 );
if (!SWIG_IsOK(res1))
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::pair< std::string,double > *","second", 1, self ));
}
ecode2 = SWIG_AsVal_double(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","second", 2, argv[0] ));
}
arg2 = static_cast< double >(val2);
if (arg1) (arg1)->second = arg2;
return Qnil;
fail:
return Qnil;
}
|
#to_s(*args) ⇒ Object
call-seq:
to_s -> VALUE
Convert class to a String representation.
9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 |
# File 'ext/mykytea_wrap.cxx', line 9661
SWIGINTERN VALUE
_wrap_Pairsd_to_s(int argc, VALUE *argv, VALUE self) {
std::pair< std::string,double > *arg1 = (std::pair< std::string,double > *) 0 ;
int res1 ;
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::asptr( self, &arg1 );
if (!SWIG_IsOK(res1))
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::pair< std::string,double > const *","to_s", 1, self ));
}
result = (VALUE)std_pair_Sl_std_string_Sc_double_Sg__to_s((std::pair< std::string,double > const *)arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|