Class: OpenCV::Std::Vector::Cv_DMatch
- Inherits:
-
Object
- Object
- OpenCV::Std::Vector::Cv_DMatch
- Extended by:
- FFI::DataConverter
- Includes:
- Enumerable
- Defined in:
- lib/ropencv/ropencv_types.rb
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #<<(val) ⇒ Object
- #[](idx) ⇒ Cv::DMatch
- #at(size) ⇒ Cv::DMatch
- #back ⇒ Cv::DMatch
- #capacity ⇒ Size_T
- #clear ⇒ Void
- #data ⇒ Void
- #delete_if(&block) ⇒ Object
- #each(&block) ⇒ Object
- #empty ⇒ Bool
- #front ⇒ Cv::DMatch
- #get_element ⇒ Cv::DMatch
- #pop_back ⇒ Void
- #push_back(other) ⇒ Void
- #reserve(size) ⇒ Void
-
#resize(size, val = Cv::DMatch.new()) ⇒ Void
methods.
- #size ⇒ Size_T
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Vector::Cv_DMatch into a string by crawling through all its attributes.
- #validate_index(idx) ⇒ Object
Class Method Details
.vector ⇒ Object .vector ⇒ Object
84320 84321 84322 84323 84324 84325 84326 84327 84328 84329 84330 84331 84332 84333 84334 84335 84336 84337 84338 84339 84340 84341 84342 84343 84344 84345 84346 84347 84348 84349 84350 84351 84352 84353 84354 |
# File 'lib/ropencv/ropencv_types.rb', line 84320 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Cv_DMatchStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # overloaded method wrapper for std::vector<cv::DMatch>::vector<cv::DMatch>() @@std_vector_cv_d_match_vector_cv_d_match_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@std_vector_cv_d_match_vector_cv_d_match_defaults0[i] end begin return Rbind::std_vector_cv_d_match_vector_cv_d_match(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::vector<cv::DMatch>::vector<cv::DMatch>(std::vector<cv::DMatch> other) @@std_vector_cv_d_match_vector_cv_d_match__2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@std_vector_cv_d_match_vector_cv_d_match__2_defaults1[i] end begin return Rbind::std_vector_cv_d_match_vector_cv_d_match__2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
Instance Method Details
#<<(val) ⇒ Object
84581 84582 84583 84584 |
# File 'lib/ropencv/ropencv_types.rb', line 84581 def <<(val) push_back(val) self end |
#[](idx) ⇒ Cv::DMatch
method wrapper for cv::DMatch std::vectorcv::DMatch::operator
84477 84478 84479 84480 84481 84482 84483 84484 84485 84486 |
# File 'lib/ropencv/ropencv_types.rb', line 84477 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_cv_d_match_operator_array( self, size) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#at(size) ⇒ Cv::DMatch
method wrapper for cv::DMatch std::vectorcv::DMatch::at(size_t size)
84491 84492 84493 84494 84495 84496 84497 84498 84499 84500 |
# File 'lib/ropencv/ropencv_types.rb', line 84491 def at(size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_cv_d_match_at( self, size) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#back ⇒ Cv::DMatch
method wrapper for cv::DMatch std::vectorcv::DMatch::back()
84516 84517 84518 84519 84520 84521 84522 84523 84524 |
# File 'lib/ropencv/ropencv_types.rb', line 84516 def back() __validate_pointer__ result = Rbind::std_vector_cv_d_match_back( self) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#capacity ⇒ Size_T
method wrapper for size_t std::vectorcv::DMatch::capacity()
84454 84455 84456 84457 |
# File 'lib/ropencv/ropencv_types.rb', line 84454 def capacity() __validate_pointer__ Rbind::std_vector_cv_d_match_capacity( self) end |
#clear ⇒ Void
method wrapper for void std::vectorcv::DMatch::clear()
84447 84448 84449 84450 |
# File 'lib/ropencv/ropencv_types.rb', line 84447 def clear() __validate_pointer__ Rbind::std_vector_cv_d_match_clear( self) end |
#data ⇒ Void
method wrapper for void* std::vectorcv::DMatch::data()
84528 84529 84530 84531 |
# File 'lib/ropencv/ropencv_types.rb', line 84528 def data() __validate_pointer__ Rbind::std_vector_cv_d_match_data( self) end |
#delete_if(&block) ⇒ Object
84585 84586 84587 84588 84589 84590 84591 84592 |
# File 'lib/ropencv/ropencv_types.rb', line 84585 def delete_if(&block) v = self.class.new each do |i| v << i if !yield(i) end v.swap(self) self end |
#each(&block) ⇒ Object
84571 84572 84573 84574 84575 84576 84577 84578 84579 84580 |
# File 'lib/ropencv/ropencv_types.rb', line 84571 def each(&block) if block s = size 0.upto(s-1) do |i| yield self[i] end else Enumerator.new(self) end end |
#empty ⇒ Bool
method wrapper for bool std::vectorcv::DMatch::empty()
84461 84462 84463 84464 |
# File 'lib/ropencv/ropencv_types.rb', line 84461 def empty() __validate_pointer__ Rbind::std_vector_cv_d_match_empty( self) end |
#front ⇒ Cv::DMatch
method wrapper for cv::DMatch std::vectorcv::DMatch::front()
84504 84505 84506 84507 84508 84509 84510 84511 84512 |
# File 'lib/ropencv/ropencv_types.rb', line 84504 def front() __validate_pointer__ result = Rbind::std_vector_cv_d_match_front( self) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#get_element ⇒ Cv::DMatch
method wrapper for cv::DMatch std::vectorcv::DMatch::operator
84560 84561 84562 84563 84564 84565 84566 84567 84568 84569 |
# File 'lib/ropencv/ropencv_types.rb', line 84560 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_cv_d_match_operator_array( self, size) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#pop_back ⇒ Void
method wrapper for void std::vectorcv::DMatch::pop_back()
84543 84544 84545 84546 |
# File 'lib/ropencv/ropencv_types.rb', line 84543 def pop_back() __validate_pointer__ Rbind::std_vector_cv_d_match_pop_back( self) end |
#push_back(other) ⇒ Void
method wrapper for void std::vectorcv::DMatch::push_back(cv::DMatch other)
84536 84537 84538 84539 |
# File 'lib/ropencv/ropencv_types.rb', line 84536 def push_back(other) __validate_pointer__ Rbind::std_vector_cv_d_match_push_back( self, other) end |
#reserve(size) ⇒ Void
method wrapper for void std::vectorcv::DMatch::reserve(size_t size)
84469 84470 84471 84472 |
# File 'lib/ropencv/ropencv_types.rb', line 84469 def reserve(size) __validate_pointer__ Rbind::std_vector_cv_d_match_reserve( self, size) end |
#resize(size, val = Cv::DMatch.new()) ⇒ Void
method wrapper for void std::vectorcv::DMatch::resize(size_t size, cv::DMatch val = cv::DMatch())
methods
84433 84434 84435 84436 |
# File 'lib/ropencv/ropencv_types.rb', line 84433 def resize(size, val = Cv::DMatch.new()) __validate_pointer__ Rbind::std_vector_cv_d_match_resize( self, size, val) end |
#size ⇒ Size_T
method wrapper for size_t std::vectorcv::DMatch::size()
84440 84441 84442 84443 |
# File 'lib/ropencv/ropencv_types.rb', line 84440 def size() __validate_pointer__ Rbind::std_vector_cv_d_match_size( self) end |
#swap(other) ⇒ Void
method wrapper for void std::vectorcv::DMatch::swap(std::vectorcv::DMatch other)
84551 84552 84553 84554 |
# File 'lib/ropencv/ropencv_types.rb', line 84551 def swap(other) __validate_pointer__ Rbind::std_vector_cv_d_match_swap( self, other) end |
#to_s ⇒ Object
converts Vector::Cv_DMatch into a string by crawling through all its attributes
84420 84421 84422 |
# File 'lib/ropencv/ropencv_types.rb', line 84420 def to_s "#<std::vector<cv::DMatch> >" end |
#validate_index(idx) ⇒ Object
84566 84567 84568 84569 84570 |
# File 'lib/ropencv/ropencv_types.rb', line 84566 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |