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
36353 36354 36355 36356 36357 36358 36359 36360 36361 36362 36363 36364 36365 36366 36367 36368 36369 36370 36371 36372 36373 36374 36375 36376 36377 36378 36379 36380 36381 36382 36383 36384 36385 36386 36387 |
# File 'lib/ropencv/ropencv_types.rb', line 36353 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_match2_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_match2_defaults1[i] end begin return Rbind::std_vector_cv_d_match_vector_cv_d_match2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
Instance Method Details
#<<(val) ⇒ Object
36614 36615 36616 36617 |
# File 'lib/ropencv/ropencv_types.rb', line 36614 def <<(val) push_back(val) self end |
#[](idx) ⇒ Cv::DMatch
method wrapper for cv::DMatch std::vectorcv::DMatch::operator
36510 36511 36512 36513 36514 36515 36516 36517 36518 36519 |
# File 'lib/ropencv/ropencv_types.rb', line 36510 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)
36524 36525 36526 36527 36528 36529 36530 36531 36532 36533 |
# File 'lib/ropencv/ropencv_types.rb', line 36524 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()
36549 36550 36551 36552 36553 36554 36555 36556 36557 |
# File 'lib/ropencv/ropencv_types.rb', line 36549 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()
36487 36488 36489 36490 |
# File 'lib/ropencv/ropencv_types.rb', line 36487 def capacity() __validate_pointer__ Rbind::std_vector_cv_d_match_capacity( self) end |
#clear ⇒ Void
method wrapper for void std::vectorcv::DMatch::clear()
36480 36481 36482 36483 |
# File 'lib/ropencv/ropencv_types.rb', line 36480 def clear() __validate_pointer__ Rbind::std_vector_cv_d_match_clear( self) end |
#data ⇒ Void
method wrapper for void* std::vectorcv::DMatch::data()
36561 36562 36563 36564 |
# File 'lib/ropencv/ropencv_types.rb', line 36561 def data() __validate_pointer__ Rbind::std_vector_cv_d_match_data( self) end |
#delete_if(&block) ⇒ Object
36618 36619 36620 36621 36622 36623 36624 36625 |
# File 'lib/ropencv/ropencv_types.rb', line 36618 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
36604 36605 36606 36607 36608 36609 36610 36611 36612 36613 |
# File 'lib/ropencv/ropencv_types.rb', line 36604 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()
36494 36495 36496 36497 |
# File 'lib/ropencv/ropencv_types.rb', line 36494 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()
36537 36538 36539 36540 36541 36542 36543 36544 36545 |
# File 'lib/ropencv/ropencv_types.rb', line 36537 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
36593 36594 36595 36596 36597 36598 36599 36600 36601 36602 |
# File 'lib/ropencv/ropencv_types.rb', line 36593 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()
36576 36577 36578 36579 |
# File 'lib/ropencv/ropencv_types.rb', line 36576 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)
36569 36570 36571 36572 |
# File 'lib/ropencv/ropencv_types.rb', line 36569 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)
36502 36503 36504 36505 |
# File 'lib/ropencv/ropencv_types.rb', line 36502 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
36466 36467 36468 36469 |
# File 'lib/ropencv/ropencv_types.rb', line 36466 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()
36473 36474 36475 36476 |
# File 'lib/ropencv/ropencv_types.rb', line 36473 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)
36584 36585 36586 36587 |
# File 'lib/ropencv/ropencv_types.rb', line 36584 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
36453 36454 36455 |
# File 'lib/ropencv/ropencv_types.rb', line 36453 def to_s "#<std::vector<cv::DMatch> >" end |
#validate_index(idx) ⇒ Object
36599 36600 36601 36602 36603 |
# File 'lib/ropencv/ropencv_types.rb', line 36599 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |