Class: OpenCV::Std::Vector::Cv_Detail_CameraParams
- Inherits:
-
Object
- Object
- OpenCV::Std::Vector::Cv_Detail_CameraParams
- 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::Detail::CameraParams
- #at(size) ⇒ Cv::Detail::CameraParams
- #back ⇒ Cv::Detail::CameraParams
- #capacity ⇒ Size_T
- #clear ⇒ Void
- #data ⇒ Void
- #delete_if(&block) ⇒ Object
- #each(&block) ⇒ Object
- #empty ⇒ Bool
- #front ⇒ Cv::Detail::CameraParams
- #get_element ⇒ Cv::Detail::CameraParams
- #pop_back ⇒ Void
- #push_back(other) ⇒ Void
- #reserve(size) ⇒ Void
-
#resize(size, val = Cv::Detail::CameraParams.new()) ⇒ Void
methods.
- #size ⇒ Size_T
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Vector::Cv_Detail_CameraParams into a string by crawling through all its attributes.
- #validate_index(idx) ⇒ Object
Class Method Details
.vector ⇒ Object .vector ⇒ Object
87151 87152 87153 87154 87155 87156 87157 87158 87159 87160 87161 87162 87163 87164 87165 87166 87167 87168 87169 87170 87171 87172 87173 87174 87175 87176 87177 87178 87179 87180 87181 87182 87183 87184 87185 |
# File 'lib/ropencv/ropencv_types.rb', line 87151 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Cv_Detail_CameraParamsStruct) 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::CameraParams>::vector<cv::detail::CameraParams>() @@std_vector_cv_detail_camera_params_vector_cv_detail_camera_params_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@std_vector_cv_detail_camera_params_vector_cv_detail_camera_params_defaults0[i] end begin return Rbind::std_vector_cv_detail_camera_params_vector_cv_detail_camera_params(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::vector<cv::detail::CameraParams>::vector<cv::detail::CameraParams>(std::vector<cv::detail::CameraParams> other) @@std_vector_cv_detail_camera_params_vector_cv_detail_camera_params__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_camera_params_vector_cv_detail_camera_params__2_defaults1[i] end begin return Rbind::std_vector_cv_detail_camera_params_vector_cv_detail_camera_params__2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
Instance Method Details
#<<(val) ⇒ Object
87412 87413 87414 87415 |
# File 'lib/ropencv/ropencv_types.rb', line 87412 def <<(val) push_back(val) self end |
#[](idx) ⇒ Cv::Detail::CameraParams
method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::operator
87308 87309 87310 87311 87312 87313 87314 87315 87316 87317 |
# File 'lib/ropencv/ropencv_types.rb', line 87308 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_cv_detail_camera_params_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::CameraParams
method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::at(size_t size)
87322 87323 87324 87325 87326 87327 87328 87329 87330 87331 |
# File 'lib/ropencv/ropencv_types.rb', line 87322 def at(size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_cv_detail_camera_params_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::Detail::CameraParams
method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::back()
87347 87348 87349 87350 87351 87352 87353 87354 87355 |
# File 'lib/ropencv/ropencv_types.rb', line 87347 def back() __validate_pointer__ result = Rbind::std_vector_cv_detail_camera_params_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::detail::CameraParams::capacity()
87285 87286 87287 87288 |
# File 'lib/ropencv/ropencv_types.rb', line 87285 def capacity() __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_capacity( self) end |
#clear ⇒ Void
method wrapper for void std::vectorcv::detail::CameraParams::clear()
87278 87279 87280 87281 |
# File 'lib/ropencv/ropencv_types.rb', line 87278 def clear() __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_clear( self) end |
#data ⇒ Void
method wrapper for void* std::vectorcv::detail::CameraParams::data()
87359 87360 87361 87362 |
# File 'lib/ropencv/ropencv_types.rb', line 87359 def data() __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_data( self) end |
#delete_if(&block) ⇒ Object
87416 87417 87418 87419 87420 87421 87422 87423 |
# File 'lib/ropencv/ropencv_types.rb', line 87416 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
87402 87403 87404 87405 87406 87407 87408 87409 87410 87411 |
# File 'lib/ropencv/ropencv_types.rb', line 87402 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::detail::CameraParams::empty()
87292 87293 87294 87295 |
# File 'lib/ropencv/ropencv_types.rb', line 87292 def empty() __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_empty( self) end |
#front ⇒ Cv::Detail::CameraParams
method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::front()
87335 87336 87337 87338 87339 87340 87341 87342 87343 |
# File 'lib/ropencv/ropencv_types.rb', line 87335 def front() __validate_pointer__ result = Rbind::std_vector_cv_detail_camera_params_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::Detail::CameraParams
method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::operator
87391 87392 87393 87394 87395 87396 87397 87398 87399 87400 |
# File 'lib/ropencv/ropencv_types.rb', line 87391 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_cv_detail_camera_params_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::detail::CameraParams::pop_back()
87374 87375 87376 87377 |
# File 'lib/ropencv/ropencv_types.rb', line 87374 def pop_back() __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_pop_back( self) end |
#push_back(other) ⇒ Void
method wrapper for void std::vectorcv::detail::CameraParams::push_back(cv::detail::CameraParams other)
87367 87368 87369 87370 |
# File 'lib/ropencv/ropencv_types.rb', line 87367 def push_back(other) __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_push_back( self, other) end |
#reserve(size) ⇒ Void
method wrapper for void std::vectorcv::detail::CameraParams::reserve(size_t size)
87300 87301 87302 87303 |
# File 'lib/ropencv/ropencv_types.rb', line 87300 def reserve(size) __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_reserve( self, size) end |
#resize(size, val = Cv::Detail::CameraParams.new()) ⇒ Void
method wrapper for void std::vectorcv::detail::CameraParams::resize(size_t size, cv::detail::CameraParams val = cv::detail::CameraParams())
methods
87264 87265 87266 87267 |
# File 'lib/ropencv/ropencv_types.rb', line 87264 def resize(size, val = Cv::Detail::CameraParams.new()) __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_resize( self, size, val) end |
#size ⇒ Size_T
method wrapper for size_t std::vectorcv::detail::CameraParams::size()
87271 87272 87273 87274 |
# File 'lib/ropencv/ropencv_types.rb', line 87271 def size() __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_size( self) end |
#swap(other) ⇒ Void
method wrapper for void std::vectorcv::detail::CameraParams::swap(std::vectorcv::detail::CameraParams other)
87382 87383 87384 87385 |
# File 'lib/ropencv/ropencv_types.rb', line 87382 def swap(other) __validate_pointer__ Rbind::std_vector_cv_detail_camera_params_swap( self, other) end |
#to_s ⇒ Object
converts Vector::Cv_Detail_CameraParams into a string by crawling through all its attributes
87251 87252 87253 |
# File 'lib/ropencv/ropencv_types.rb', line 87251 def to_s "#<std::vector<cv::detail::CameraParams> >" end |
#validate_index(idx) ⇒ Object
87397 87398 87399 87400 87401 |
# File 'lib/ropencv/ropencv_types.rb', line 87397 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |