Class: OpenCV::Std::Vector::Std_Vector_Cv_Point2f
- Inherits:
-
Object
- Object
- OpenCV::Std::Vector::Std_Vector_Cv_Point2f
- 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) ⇒ Std::Vector::Cv_Point2f
- #at(size) ⇒ Std::Vector::Cv_Point2f
- #back ⇒ Std::Vector::Cv_Point2f
- #capacity ⇒ Size_T
- #clear ⇒ Void
- #data ⇒ Void
- #delete_if(&block) ⇒ Object
- #each(&block) ⇒ Object
- #empty ⇒ Bool
- #front ⇒ Std::Vector::Cv_Point2f
- #get_element ⇒ Std::Vector::Cv_Point2f
- #pop_back ⇒ Void
- #push_back(other) ⇒ Void
- #reserve(size) ⇒ Void
-
#resize(size, val = Std::Vector::Cv_Point2f.new()) ⇒ Void
methods.
- #size ⇒ Size_T
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Vector::Std_Vector_Cv_Point2f into a string by crawling through all its attributes.
- #validate_index(idx) ⇒ Object
Class Method Details
.vector ⇒ Object .vector ⇒ Object
82745 82746 82747 82748 82749 82750 82751 82752 82753 82754 82755 82756 82757 82758 82759 82760 82761 82762 82763 82764 82765 82766 82767 82768 82769 82770 82771 82772 82773 82774 82775 82776 82777 82778 82779 |
# File 'lib/ropencv/ropencv_types.rb', line 82745 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Std_Vector_Cv_Point2fStruct) 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::Point2f>>::vector<std::vector<cv::Point2f>>() @@std_vector_std_vector_cv_point_2f_vector_std_vector_cv_point_2f_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@std_vector_std_vector_cv_point_2f_vector_std_vector_cv_point_2f_defaults0[i] end begin return Rbind::std_vector_std_vector_cv_point_2f_vector_std_vector_cv_point_2f(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::vector<std::vector<cv::Point2f>>::vector<std::vector<cv::Point2f>>(std::vector<std::vector<cv::Point2f>> other) @@std_vector_std_vector_cv_point_2f_vector_std_vector_cv_point_2f__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_point_2f_vector_std_vector_cv_point_2f__2_defaults1[i] end begin return Rbind::std_vector_std_vector_cv_point_2f_vector_std_vector_cv_point_2f__2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.null ⇒ Object
returns a null pointer to the object
82737 82738 82739 |
# File 'lib/ropencv/ropencv_types.rb', line 82737 def self.null new(Vector::Std_Vector_Cv_Point2fStruct.new) end |
Instance Method Details
#<<(val) ⇒ Object
83006 83007 83008 83009 |
# File 'lib/ropencv/ropencv_types.rb', line 83006 def <<(val) push_back(val) self end |
#[](idx) ⇒ Std::Vector::Cv_Point2f
method wrapper for std::vectorcv::Point2f std::vectorstd::vector<cv::Point2f>::operator
82902 82903 82904 82905 82906 82907 82908 82909 82910 82911 |
# File 'lib/ropencv/ropencv_types.rb', line 82902 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_std_vector_cv_point_2f_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_Point2f
method wrapper for std::vectorcv::Point2f std::vectorstd::vector<cv::Point2f>::at(size_t size)
82916 82917 82918 82919 82920 82921 82922 82923 82924 82925 |
# File 'lib/ropencv/ropencv_types.rb', line 82916 def at(size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_std_vector_cv_point_2f_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 ⇒ Std::Vector::Cv_Point2f
method wrapper for std::vectorcv::Point2f std::vectorstd::vector<cv::Point2f>::back()
82941 82942 82943 82944 82945 82946 82947 82948 82949 |
# File 'lib/ropencv/ropencv_types.rb', line 82941 def back() __validate_pointer__ result = Rbind::std_vector_std_vector_cv_point_2f_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::vectorstd::vector<cv::Point2f>::capacity()
82879 82880 82881 82882 |
# File 'lib/ropencv/ropencv_types.rb', line 82879 def capacity() __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_capacity( self) end |
#clear ⇒ Void
method wrapper for void std::vectorstd::vector<cv::Point2f>::clear()
82872 82873 82874 82875 |
# File 'lib/ropencv/ropencv_types.rb', line 82872 def clear() __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_clear( self) end |
#data ⇒ Void
method wrapper for void* std::vectorstd::vector<cv::Point2f>::data()
82953 82954 82955 82956 |
# File 'lib/ropencv/ropencv_types.rb', line 82953 def data() __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_data( self) end |
#delete_if(&block) ⇒ Object
83010 83011 83012 83013 83014 83015 83016 83017 |
# File 'lib/ropencv/ropencv_types.rb', line 83010 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
82996 82997 82998 82999 83000 83001 83002 83003 83004 83005 |
# File 'lib/ropencv/ropencv_types.rb', line 82996 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::vectorstd::vector<cv::Point2f>::empty()
82886 82887 82888 82889 |
# File 'lib/ropencv/ropencv_types.rb', line 82886 def empty() __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_empty( self) end |
#front ⇒ Std::Vector::Cv_Point2f
method wrapper for std::vectorcv::Point2f std::vectorstd::vector<cv::Point2f>::front()
82929 82930 82931 82932 82933 82934 82935 82936 82937 |
# File 'lib/ropencv/ropencv_types.rb', line 82929 def front() __validate_pointer__ result = Rbind::std_vector_std_vector_cv_point_2f_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 ⇒ Std::Vector::Cv_Point2f
method wrapper for std::vectorcv::Point2f std::vectorstd::vector<cv::Point2f>::operator
82985 82986 82987 82988 82989 82990 82991 82992 82993 82994 |
# File 'lib/ropencv/ropencv_types.rb', line 82985 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_std_vector_cv_point_2f_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::vectorstd::vector<cv::Point2f>::pop_back()
82968 82969 82970 82971 |
# File 'lib/ropencv/ropencv_types.rb', line 82968 def pop_back() __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_pop_back( self) end |
#push_back(other) ⇒ Void
method wrapper for void std::vectorstd::vector<cv::Point2f>::push_back(std::vectorcv::Point2f other)
82961 82962 82963 82964 |
# File 'lib/ropencv/ropencv_types.rb', line 82961 def push_back(other) __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_push_back( self, other) end |
#reserve(size) ⇒ Void
method wrapper for void std::vectorstd::vector<cv::Point2f>::reserve(size_t size)
82894 82895 82896 82897 |
# File 'lib/ropencv/ropencv_types.rb', line 82894 def reserve(size) __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_reserve( self, size) end |
#resize(size, val = Std::Vector::Cv_Point2f.new()) ⇒ Void
method wrapper for void std::vectorstd::vector<cv::Point2f>::resize(size_t size, std::vectorcv::Point2f val = std::vectorcv::Point2f())
methods
82858 82859 82860 82861 |
# File 'lib/ropencv/ropencv_types.rb', line 82858 def resize(size, val = Std::Vector::Cv_Point2f.new()) __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_resize( self, size, val) end |
#size ⇒ Size_T
method wrapper for size_t std::vectorstd::vector<cv::Point2f>::size()
82865 82866 82867 82868 |
# File 'lib/ropencv/ropencv_types.rb', line 82865 def size() __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_size( self) end |
#swap(other) ⇒ Void
method wrapper for void std::vectorstd::vector<cv::Point2f>::swap(std::vectorstd::vector<cv::Point2f> other)
82976 82977 82978 82979 |
# File 'lib/ropencv/ropencv_types.rb', line 82976 def swap(other) __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_swap( self, other) end |
#to_s ⇒ Object
converts Vector::Std_Vector_Cv_Point2f into a string by crawling through all its attributes
82845 82846 82847 |
# File 'lib/ropencv/ropencv_types.rb', line 82845 def to_s "#<std::vector<std::vector<cv::Point2f>> >" end |
#validate_index(idx) ⇒ Object
82991 82992 82993 82994 82995 |
# File 'lib/ropencv/ropencv_types.rb', line 82991 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |