Class: GPS_PVT::GPS::Measurement

Inherits:
Object
  • Object
show all
Defined in:
ext/gps_pvt/GPS/GPS_wrap.cxx,
ext/gps_pvt/GPS/GPS_wrap.cxx

Overview

Proxy of C++ GPS_PVT::GPS::Measurement class

Instance Method Summary collapse

Constructor Details

#initialize(*args, self) ⇒ Object



15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
# File 'ext/gps_pvt/GPS/GPS_wrap.cxx', line 15670

SWIGINTERN VALUE _wrap_new_Measurement(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[1];
  int ii;
  
  argc = nargs;
  if (argc > 1) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 0) {
    return _wrap_new_Measurement__SWIG_0(nargs, args, self);
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_CheckState(SWIG_ConvertPtr(argv[0], (void **)0, SWIGTYPE_p_GPS_MeasurementT_double_t, 0))
      || swig::check<GPS_Measurement<double> >(argv[0]);
    }
    if (_v) {
      return _wrap_new_Measurement__SWIG_1(nargs, args, self);
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 1, "Measurement.new", 
    "    Measurement.new()\n"
    "    Measurement.new(GPS_Measurement< double > const &other)\n");
  
  return Qnil;
}

Instance Method Details

#add(*args) ⇒ Object

call-seq:

add(int const & prn, int const & key, double const & value)

An instance method.



15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
# File 'ext/gps_pvt/GPS/GPS_wrap.cxx', line 15482

SWIGINTERN VALUE
_wrap_Measurement_add(int argc, VALUE *argv, VALUE self) {
  GPS_Measurement< double > *arg1 = (GPS_Measurement< double > *) 0 ;
  int *arg2 = 0 ;
  int *arg3 = 0 ;
  double *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int temp2 ;
  int val2 ;
  int ecode2 = 0 ;
  int temp3 ;
  int val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  double val4 ;
  int ecode4 = 0 ;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GPS_MeasurementT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GPS_Measurement< double > *","add", 1, self )); 
  }
  arg1 = reinterpret_cast< GPS_Measurement< double > * >(argp1);
  ecode2 = SWIG_AsVal_int(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","add", 2, argv[0] ));
  } 
  temp2 = static_cast< int >(val2);
  arg2 = &temp2;
  ecode3 = SWIG_AsVal_int(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","add", 3, argv[1] ));
  } 
  temp3 = static_cast< int >(val3);
  arg3 = &temp3;
  ecode4 = SWIG_AsVal_double(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","add", 4, argv[2] ));
  } 
  temp4 = static_cast< double >(val4);
  arg4 = &temp4;
  (arg1)->add((int const &)*arg2,(int const &)*arg3,(double const &)*arg4);
  return Qnil;
fail:
  return Qnil;
}

#each(*args) ⇒ Object

call-seq:

each

Iterate thru each element in the Measurement. A block must be provided.



15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
# File 'ext/gps_pvt/GPS/GPS_wrap.cxx', line 15541

SWIGINTERN VALUE
_wrap_Measurement_each(int argc, VALUE *argv, VALUE self) {
  GPS_Measurement< double > *arg1 = (GPS_Measurement< double > *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  {
    if(!rb_block_given_p()){
      return rb_enumeratorize(self, ID2SYM(rb_frame_callee()), argc, argv);
    }
    
  }
  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_GPS_MeasurementT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GPS_Measurement< double > const *","each", 1, self )); 
  }
  arg1 = reinterpret_cast< GPS_Measurement< double > * >(argp1);
  try {
    GPS_Measurement_Sl_double_Sg__each((GPS_Measurement< double > const *)arg1,(void const *)arg2);
  } catch(native_exception &_e) {
    (&_e)->regenerate();
    SWIG_fail;
  }
  return Qnil;
fail:
  return Qnil;
}

#to_hash(*args) ⇒ Object

call-seq:

to_hash -> VALUE

An instance method.



15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
# File 'ext/gps_pvt/GPS/GPS_wrap.cxx', line 15583

SWIGINTERN VALUE
_wrap_Measurement_to_hash(int argc, VALUE *argv, VALUE self) {
  GPS_Measurement< double > *arg1 = (GPS_Measurement< 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_GPS_MeasurementT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GPS_Measurement< double > const *","to_hash", 1, self )); 
  }
  arg1 = reinterpret_cast< GPS_Measurement< double > * >(argp1);
  result = (VALUE)GPS_Measurement_Sl_double_Sg__to_hash((GPS_Measurement< double > const *)arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}