Class: OpenCV::Std::Vector::Std_Vector_Cv_DMatch

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Includes:
Enumerable
Defined in:
lib/ropencv/ropencv_types.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.vectorObject .vectorObject

Overloads:

Raises:

  • (ArgumentError)


84639
84640
84641
84642
84643
84644
84645
84646
84647
84648
84649
84650
84651
84652
84653
84654
84655
84656
84657
84658
84659
84660
84661
84662
84663
84664
84665
84666
84667
84668
84669
84670
84671
84672
84673
# File 'lib/ropencv/ropencv_types.rb', line 84639

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Std_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<std::vector<cv::DMatch>>::vector<std::vector<cv::DMatch>>()
    @@std_vector_std_vector_cv_d_match_vector_std_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_std_vector_cv_d_match_vector_std_vector_cv_d_match_defaults0[i]
        end
        begin
                return Rbind::std_vector_std_vector_cv_d_match_vector_std_vector_cv_d_match(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for std::vector<std::vector<cv::DMatch>>::vector<std::vector<cv::DMatch>>(std::vector<std::vector<cv::DMatch>> other)
    @@std_vector_std_vector_cv_d_match_vector_std_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_std_vector_cv_d_match_vector_std_vector_cv_d_match__2_defaults1[i]
        end
        begin
                return Rbind::std_vector_std_vector_cv_d_match_vector_std_vector_cv_d_match__2(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.nullObject

returns a null pointer to the object



84631
84632
84633
# File 'lib/ropencv/ropencv_types.rb', line 84631

def self.null
    new(Vector::Std_Vector_Cv_DMatchStruct.new)
end

Instance Method Details

#<<(val) ⇒ Object



84900
84901
84902
84903
# File 'lib/ropencv/ropencv_types.rb', line 84900

def <<(val)
    push_back(val)
    self
end

#[](idx) ⇒ Std::Vector::Cv_DMatch

Note:

method wrapper for std::vectorcv::DMatch std::vectorstd::vector<cv::DMatch>::operator

Parameters:

  • size (Size_T)

Returns:



84796
84797
84798
84799
84800
84801
84802
84803
84804
84805
# File 'lib/ropencv/ropencv_types.rb', line 84796

def [](size)
validate_index(size)
    __validate_pointer__
    result = Rbind::std_vector_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) ⇒ Std::Vector::Cv_DMatch

Note:

method wrapper for std::vectorcv::DMatch std::vectorstd::vector<cv::DMatch>::at(size_t size)

Parameters:

  • size (Size_T)

Returns:



84810
84811
84812
84813
84814
84815
84816
84817
84818
84819
# File 'lib/ropencv/ropencv_types.rb', line 84810

def at(size)
validate_index(size)
    __validate_pointer__
    result = Rbind::std_vector_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

#backStd::Vector::Cv_DMatch

Note:

method wrapper for std::vectorcv::DMatch std::vectorstd::vector<cv::DMatch>::back()



84835
84836
84837
84838
84839
84840
84841
84842
84843
# File 'lib/ropencv/ropencv_types.rb', line 84835

def back()
    __validate_pointer__
    result = Rbind::std_vector_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

#capacitySize_T

Note:

method wrapper for size_t std::vectorstd::vector<cv::DMatch>::capacity()

Returns:

  • (Size_T)


84773
84774
84775
84776
# File 'lib/ropencv/ropencv_types.rb', line 84773

def capacity()
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_capacity( self)
end

#clearVoid

Note:

method wrapper for void std::vectorstd::vector<cv::DMatch>::clear()

Returns:

  • (Void)


84766
84767
84768
84769
# File 'lib/ropencv/ropencv_types.rb', line 84766

def clear()
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_clear( self)
end

#dataVoid

Note:

method wrapper for void* std::vectorstd::vector<cv::DMatch>::data()

Returns:

  • (Void)


84847
84848
84849
84850
# File 'lib/ropencv/ropencv_types.rb', line 84847

def data()
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_data( self)
end

#delete_if(&block) ⇒ Object



84904
84905
84906
84907
84908
84909
84910
84911
# File 'lib/ropencv/ropencv_types.rb', line 84904

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



84890
84891
84892
84893
84894
84895
84896
84897
84898
84899
# File 'lib/ropencv/ropencv_types.rb', line 84890

def each(&block)
    if block
         s = size
         0.upto(s-1) do |i|
             yield self[i]
         end
    else
        Enumerator.new(self)
    end
end

#emptyBool

Note:

method wrapper for bool std::vectorstd::vector<cv::DMatch>::empty()

Returns:

  • (Bool)


84780
84781
84782
84783
# File 'lib/ropencv/ropencv_types.rb', line 84780

def empty()
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_empty( self)
end

#frontStd::Vector::Cv_DMatch

Note:

method wrapper for std::vectorcv::DMatch std::vectorstd::vector<cv::DMatch>::front()



84823
84824
84825
84826
84827
84828
84829
84830
84831
# File 'lib/ropencv/ropencv_types.rb', line 84823

def front()
    __validate_pointer__
    result = Rbind::std_vector_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_elementStd::Vector::Cv_DMatch

Note:

method wrapper for std::vectorcv::DMatch std::vectorstd::vector<cv::DMatch>::operator

Parameters:

  • size (Size_T)

Returns:



84879
84880
84881
84882
84883
84884
84885
84886
84887
84888
# File 'lib/ropencv/ropencv_types.rb', line 84879

def [](size)
validate_index(size)
    __validate_pointer__
    result = Rbind::std_vector_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_backVoid

Note:

method wrapper for void std::vectorstd::vector<cv::DMatch>::pop_back()

Returns:

  • (Void)


84862
84863
84864
84865
# File 'lib/ropencv/ropencv_types.rb', line 84862

def pop_back()
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_pop_back( self)
end

#push_back(other) ⇒ Void

Note:

method wrapper for void std::vectorstd::vector<cv::DMatch>::push_back(std::vectorcv::DMatch other)

Parameters:

Returns:

  • (Void)


84855
84856
84857
84858
# File 'lib/ropencv/ropencv_types.rb', line 84855

def push_back(other)
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_push_back( self, other)
end

#reserve(size) ⇒ Void

Note:

method wrapper for void std::vectorstd::vector<cv::DMatch>::reserve(size_t size)

Parameters:

  • size (Size_T)

Returns:

  • (Void)


84788
84789
84790
84791
# File 'lib/ropencv/ropencv_types.rb', line 84788

def reserve(size)
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_reserve( self, size)
end

#resize(size, val = Std::Vector::Cv_DMatch.new()) ⇒ Void

Note:

method wrapper for void std::vectorstd::vector<cv::DMatch>::resize(size_t size, std::vectorcv::DMatch val = std::vectorcv::DMatch())

methods

Parameters:

Returns:

  • (Void)


84752
84753
84754
84755
# File 'lib/ropencv/ropencv_types.rb', line 84752

def resize(size, val = Std::Vector::Cv_DMatch.new())
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_resize( self, size, val)
end

#sizeSize_T

Note:

method wrapper for size_t std::vectorstd::vector<cv::DMatch>::size()

Returns:

  • (Size_T)


84759
84760
84761
84762
# File 'lib/ropencv/ropencv_types.rb', line 84759

def size()
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_size( self)
end

#swap(other) ⇒ Void

Note:

method wrapper for void std::vectorstd::vector<cv::DMatch>::swap(std::vectorstd::vector<cv::DMatch> other)

Parameters:

Returns:

  • (Void)


84870
84871
84872
84873
# File 'lib/ropencv/ropencv_types.rb', line 84870

def swap(other)
    __validate_pointer__
    Rbind::std_vector_std_vector_cv_d_match_swap( self, other)
end

#to_sObject

converts Vector::Std_Vector_Cv_DMatch into a string by crawling through all its attributes



84739
84740
84741
# File 'lib/ropencv/ropencv_types.rb', line 84739

def to_s
    "#<std::vector<std::vector<cv::DMatch>> >"
end

#validate_index(idx) ⇒ Object



84885
84886
84887
84888
84889
# File 'lib/ropencv/ropencv_types.rb', line 84885

def validate_index(idx)
    if idx < 0 || idx >= size
        raise RangeError,"#{idx} is out of range [0..#{size-1}]"
    end
end