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
35077 35078 35079 35080 35081 35082 35083 35084 35085 35086 35087 35088 35089 35090 35091 35092 35093 35094 35095 35096 35097 35098 35099 35100 35101 35102 35103 35104 35105 35106 35107 35108 35109 35110 35111 |
# File 'lib/ropencv/ropencv_types.rb', line 35077 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_2f2_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_2f2_defaults1[i] end begin return Rbind::std_vector_std_vector_cv_point_2f_vector_std_vector_cv_point_2f2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
Instance Method Details
#<<(val) ⇒ Object
35338 35339 35340 35341 |
# File 'lib/ropencv/ropencv_types.rb', line 35338 def <<(val) push_back(val) self end |
#[](idx) ⇒ Std::Vector::Cv_Point2f
method wrapper for std::vectorcv::Point2f std::vectorstd::vector<cv::Point2f>::operator
35234 35235 35236 35237 35238 35239 35240 35241 35242 35243 |
# File 'lib/ropencv/ropencv_types.rb', line 35234 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)
35248 35249 35250 35251 35252 35253 35254 35255 35256 35257 |
# File 'lib/ropencv/ropencv_types.rb', line 35248 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()
35273 35274 35275 35276 35277 35278 35279 35280 35281 |
# File 'lib/ropencv/ropencv_types.rb', line 35273 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()
35211 35212 35213 35214 |
# File 'lib/ropencv/ropencv_types.rb', line 35211 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()
35204 35205 35206 35207 |
# File 'lib/ropencv/ropencv_types.rb', line 35204 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()
35285 35286 35287 35288 |
# File 'lib/ropencv/ropencv_types.rb', line 35285 def data() __validate_pointer__ Rbind::std_vector_std_vector_cv_point_2f_data( self) end |
#delete_if(&block) ⇒ Object
35342 35343 35344 35345 35346 35347 35348 35349 |
# File 'lib/ropencv/ropencv_types.rb', line 35342 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
35328 35329 35330 35331 35332 35333 35334 35335 35336 35337 |
# File 'lib/ropencv/ropencv_types.rb', line 35328 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()
35218 35219 35220 35221 |
# File 'lib/ropencv/ropencv_types.rb', line 35218 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()
35261 35262 35263 35264 35265 35266 35267 35268 35269 |
# File 'lib/ropencv/ropencv_types.rb', line 35261 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
35317 35318 35319 35320 35321 35322 35323 35324 35325 35326 |
# File 'lib/ropencv/ropencv_types.rb', line 35317 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()
35300 35301 35302 35303 |
# File 'lib/ropencv/ropencv_types.rb', line 35300 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)
35293 35294 35295 35296 |
# File 'lib/ropencv/ropencv_types.rb', line 35293 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)
35226 35227 35228 35229 |
# File 'lib/ropencv/ropencv_types.rb', line 35226 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
35190 35191 35192 35193 |
# File 'lib/ropencv/ropencv_types.rb', line 35190 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()
35197 35198 35199 35200 |
# File 'lib/ropencv/ropencv_types.rb', line 35197 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)
35308 35309 35310 35311 |
# File 'lib/ropencv/ropencv_types.rb', line 35308 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
35177 35178 35179 |
# File 'lib/ropencv/ropencv_types.rb', line 35177 def to_s "#<std::vector<std::vector<cv::Point2f>> >" end |
#validate_index(idx) ⇒ Object
35323 35324 35325 35326 35327 |
# File 'lib/ropencv/ropencv_types.rb', line 35323 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |