Class: OpenCV::Std::Vector::Cv_Detail_MatchesInfo

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)


86832
86833
86834
86835
86836
86837
86838
86839
86840
86841
86842
86843
86844
86845
86846
86847
86848
86849
86850
86851
86852
86853
86854
86855
86856
86857
86858
86859
86860
86861
86862
86863
86864
86865
86866
# File 'lib/ropencv/ropencv_types.rb', line 86832

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Cv_Detail_MatchesInfoStruct)
        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::detail::MatchesInfo>::vector<cv::detail::MatchesInfo>()
    @@std_vector_cv_detail_matches_info_vector_cv_detail_matches_info_defaults0 ||= []
    if(args.size >= 0 && args.size <= 0)
        targs = args.clone
        targs.size.upto(-1) do |i|
            targs[i] = @@std_vector_cv_detail_matches_info_vector_cv_detail_matches_info_defaults0[i]
        end
        begin
                return Rbind::std_vector_cv_detail_matches_info_vector_cv_detail_matches_info(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for std::vector<cv::detail::MatchesInfo>::vector<cv::detail::MatchesInfo>(std::vector<cv::detail::MatchesInfo> other)
    @@std_vector_cv_detail_matches_info_vector_cv_detail_matches_info__2_defaults1 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@std_vector_cv_detail_matches_info_vector_cv_detail_matches_info__2_defaults1[i]
        end
        begin
                return Rbind::std_vector_cv_detail_matches_info_vector_cv_detail_matches_info__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



86824
86825
86826
# File 'lib/ropencv/ropencv_types.rb', line 86824

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

Instance Method Details

#<<(val) ⇒ Object



87093
87094
87095
87096
# File 'lib/ropencv/ropencv_types.rb', line 87093

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

#[](idx) ⇒ Cv::Detail::MatchesInfo

Note:

method wrapper for cv::detail::MatchesInfo std::vectorcv::detail::MatchesInfo::operator

Parameters:

  • size (Size_T)

Returns:



86989
86990
86991
86992
86993
86994
86995
86996
86997
86998
# File 'lib/ropencv/ropencv_types.rb', line 86989

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

Note:

method wrapper for cv::detail::MatchesInfo std::vectorcv::detail::MatchesInfo::at(size_t size)

Parameters:

  • size (Size_T)

Returns:



87003
87004
87005
87006
87007
87008
87009
87010
87011
87012
# File 'lib/ropencv/ropencv_types.rb', line 87003

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

#backCv::Detail::MatchesInfo

Note:

method wrapper for cv::detail::MatchesInfo std::vectorcv::detail::MatchesInfo::back()



87028
87029
87030
87031
87032
87033
87034
87035
87036
# File 'lib/ropencv/ropencv_types.rb', line 87028

def back()
    __validate_pointer__
    result = Rbind::std_vector_cv_detail_matches_info_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::vectorcv::detail::MatchesInfo::capacity()

Returns:

  • (Size_T)


86966
86967
86968
86969
# File 'lib/ropencv/ropencv_types.rb', line 86966

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

#clearVoid

Note:

method wrapper for void std::vectorcv::detail::MatchesInfo::clear()

Returns:

  • (Void)


86959
86960
86961
86962
# File 'lib/ropencv/ropencv_types.rb', line 86959

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

#dataVoid

Note:

method wrapper for void* std::vectorcv::detail::MatchesInfo::data()

Returns:

  • (Void)


87040
87041
87042
87043
# File 'lib/ropencv/ropencv_types.rb', line 87040

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

#delete_if(&block) ⇒ Object



87097
87098
87099
87100
87101
87102
87103
87104
# File 'lib/ropencv/ropencv_types.rb', line 87097

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



87083
87084
87085
87086
87087
87088
87089
87090
87091
87092
# File 'lib/ropencv/ropencv_types.rb', line 87083

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::vectorcv::detail::MatchesInfo::empty()

Returns:

  • (Bool)


86973
86974
86975
86976
# File 'lib/ropencv/ropencv_types.rb', line 86973

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

#frontCv::Detail::MatchesInfo

Note:

method wrapper for cv::detail::MatchesInfo std::vectorcv::detail::MatchesInfo::front()



87016
87017
87018
87019
87020
87021
87022
87023
87024
# File 'lib/ropencv/ropencv_types.rb', line 87016

def front()
    __validate_pointer__
    result = Rbind::std_vector_cv_detail_matches_info_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_elementCv::Detail::MatchesInfo

Note:

method wrapper for cv::detail::MatchesInfo std::vectorcv::detail::MatchesInfo::operator

Parameters:

  • size (Size_T)

Returns:



87072
87073
87074
87075
87076
87077
87078
87079
87080
87081
# File 'lib/ropencv/ropencv_types.rb', line 87072

def [](size)
validate_index(size)
    __validate_pointer__
    result = Rbind::std_vector_cv_detail_matches_info_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::vectorcv::detail::MatchesInfo::pop_back()

Returns:

  • (Void)


87055
87056
87057
87058
# File 'lib/ropencv/ropencv_types.rb', line 87055

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

#push_back(other) ⇒ Void

Note:

method wrapper for void std::vectorcv::detail::MatchesInfo::push_back(cv::detail::MatchesInfo other)

Parameters:

Returns:

  • (Void)


87048
87049
87050
87051
# File 'lib/ropencv/ropencv_types.rb', line 87048

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

#reserve(size) ⇒ Void

Note:

method wrapper for void std::vectorcv::detail::MatchesInfo::reserve(size_t size)

Parameters:

  • size (Size_T)

Returns:

  • (Void)


86981
86982
86983
86984
# File 'lib/ropencv/ropencv_types.rb', line 86981

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

#resize(size, val = Cv::Detail::MatchesInfo.new()) ⇒ Void

Note:

method wrapper for void std::vectorcv::detail::MatchesInfo::resize(size_t size, cv::detail::MatchesInfo val = cv::detail::MatchesInfo())

methods

Parameters:

Returns:

  • (Void)


86945
86946
86947
86948
# File 'lib/ropencv/ropencv_types.rb', line 86945

def resize(size, val = Cv::Detail::MatchesInfo.new())
    __validate_pointer__
    Rbind::std_vector_cv_detail_matches_info_resize( self, size, val)
end

#sizeSize_T

Note:

method wrapper for size_t std::vectorcv::detail::MatchesInfo::size()

Returns:

  • (Size_T)


86952
86953
86954
86955
# File 'lib/ropencv/ropencv_types.rb', line 86952

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

#swap(other) ⇒ Void

Note:

method wrapper for void std::vectorcv::detail::MatchesInfo::swap(std::vectorcv::detail::MatchesInfo other)

Parameters:

Returns:

  • (Void)


87063
87064
87065
87066
# File 'lib/ropencv/ropencv_types.rb', line 87063

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

#to_sObject

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



86932
86933
86934
# File 'lib/ropencv/ropencv_types.rb', line 86932

def to_s
    "#<std::vector<cv::detail::MatchesInfo> >"
end

#validate_index(idx) ⇒ Object



87078
87079
87080
87081
87082
# File 'lib/ropencv/ropencv_types.rb', line 87078

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