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



14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
# File 'ext/gps_pvt/GPS/GPS_wrap.cxx', line 14701

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.



14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
# File 'ext/gps_pvt/GPS/GPS_wrap.cxx', line 14476

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;
  {
    try {
      (arg1)->add((int const &)*arg2,(int const &)*arg3,(double const &)*arg4);
    } catch (const native_exception &e) {
      e.regenerate();
      SWIG_fail;
    } catch (const std::exception& e) {
      SWIG_exception_fail(SWIG_RuntimeError, e.what());
    }
  }
  return Qnil;
fail:
  return Qnil;
}

#each(*args) ⇒ Object

call-seq:

each

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



14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
# File 'ext/gps_pvt/GPS/GPS_wrap.cxx', line 14544

SWIGINTERN VALUE
_wrap_Measurement_each(int argc, VALUE *argv, VALUE self) {
  GPS_Measurement< double > *arg1 = (GPS_Measurement< 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_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);
  {
    if(!rb_block_given_p()){
      return rb_enumeratorize(self, ID2SYM(rb_intern("each")), argc, argv);
    }
    
    try {
      GPS_Measurement_Sl_double_Sg__each((GPS_Measurement< double > const *)arg1);
    } catch (const native_exception &e) {
      e.regenerate();
      SWIG_fail;
    } catch (const std::exception& e) {
      SWIG_exception_fail(SWIG_RuntimeError, e.what());
    }
  }
  return Qnil;
fail:
  return Qnil;
}

#to_hash(*args) ⇒ Object

call-seq:

to_hash -> VALUE

An instance method.



14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
# File 'ext/gps_pvt/GPS/GPS_wrap.cxx', line 14587

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);
  {
    try {
      result = (VALUE)GPS_Measurement_Sl_double_Sg__to_hash((GPS_Measurement< double > const *)arg1);
    } catch (const native_exception &e) {
      e.regenerate();
      SWIG_fail;
    } catch (const std::exception& e) {
      SWIG_exception_fail(SWIG_RuntimeError, e.what());
    }
  }
  vresult = result;
  return vresult;
fail:
  return Qnil;
}