Class: OpenCV::Std::Vector::Uint32_T
- Inherits:
-
Object
- Object
- OpenCV::Std::Vector::Uint32_T
- 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) ⇒ Fixnum
- #at(size) ⇒ Fixnum
- #back ⇒ Fixnum
- #capacity ⇒ Size_T
- #clear ⇒ Void
- #data ⇒ Void
- #delete_if(&block) ⇒ Object
- #each(&block) ⇒ Object
- #empty ⇒ Bool
- #front ⇒ Fixnum
- #get_element ⇒ Fixnum
- #pop_back ⇒ Void
- #push_back(other) ⇒ Void
- #reserve(size) ⇒ Void
-
#resize(size, val = Uint32_T()) ⇒ Void
methods.
- #size ⇒ Size_T
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Vector::Uint32_T into a string by crawling through all its attributes.
- #validate_index(idx) ⇒ Object
Class Method Details
.vector ⇒ Object .vector ⇒ Object
39164 39165 39166 39167 39168 39169 39170 39171 39172 39173 39174 39175 39176 39177 39178 39179 39180 39181 39182 39183 39184 39185 39186 39187 39188 39189 39190 39191 39192 39193 39194 39195 39196 39197 39198 |
# File 'lib/ropencv/ropencv_types.rb', line 39164 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Uint32_TStruct) 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<uint32_t>::vector<uint32_t>() @@std_vector_uint32t_vector_uint32t_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@std_vector_uint32t_vector_uint32t_defaults0[i] end begin return Rbind::std_vector_uint32t_vector_uint32t(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::vector<uint32_t>::vector<uint32_t>(std::vector<uint32_t> other) @@std_vector_uint32t_vector_uint32t2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@std_vector_uint32t_vector_uint32t2_defaults1[i] end begin return Rbind::std_vector_uint32t_vector_uint32t2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
Instance Method Details
#<<(val) ⇒ Object
39405 39406 39407 39408 |
# File 'lib/ropencv/ropencv_types.rb', line 39405 def <<(val) push_back(val) self end |
#[](idx) ⇒ Fixnum
method wrapper for uint32_t std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::operator[](size_t size)
39321 39322 39323 39324 39325 |
# File 'lib/ropencv/ropencv_types.rb', line 39321 def [](size) validate_index(size) __validate_pointer__ Rbind::std_vector_uint32t_operator_array( self, size) end |
#at(size) ⇒ Fixnum
method wrapper for uint32_t std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::at(size_t size)
39330 39331 39332 39333 39334 |
# File 'lib/ropencv/ropencv_types.rb', line 39330 def at(size) validate_index(size) __validate_pointer__ Rbind::std_vector_uint32t_at( self, size) end |
#back ⇒ Fixnum
method wrapper for uint32_t std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::back()
39345 39346 39347 39348 |
# File 'lib/ropencv/ropencv_types.rb', line 39345 def back() __validate_pointer__ Rbind::std_vector_uint32t_back( self) end |
#capacity ⇒ Size_T
method wrapper for size_t std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::capacity()
39298 39299 39300 39301 |
# File 'lib/ropencv/ropencv_types.rb', line 39298 def capacity() __validate_pointer__ Rbind::std_vector_uint32t_capacity( self) end |
#clear ⇒ Void
method wrapper for void std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::clear()
39291 39292 39293 39294 |
# File 'lib/ropencv/ropencv_types.rb', line 39291 def clear() __validate_pointer__ Rbind::std_vector_uint32t_clear( self) end |
#data ⇒ Void
method wrapper for void* std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::data()
39352 39353 39354 39355 |
# File 'lib/ropencv/ropencv_types.rb', line 39352 def data() __validate_pointer__ Rbind::std_vector_uint32t_data( self) end |
#delete_if(&block) ⇒ Object
39409 39410 39411 39412 39413 39414 39415 39416 |
# File 'lib/ropencv/ropencv_types.rb', line 39409 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
39395 39396 39397 39398 39399 39400 39401 39402 39403 39404 |
# File 'lib/ropencv/ropencv_types.rb', line 39395 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::vector
Maruku could not parse this XML/HTML:
<uint32_t>::empty()
39305 39306 39307 39308 |
# File 'lib/ropencv/ropencv_types.rb', line 39305 def empty() __validate_pointer__ Rbind::std_vector_uint32t_empty( self) end |
#front ⇒ Fixnum
method wrapper for uint32_t std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::front()
39338 39339 39340 39341 |
# File 'lib/ropencv/ropencv_types.rb', line 39338 def front() __validate_pointer__ Rbind::std_vector_uint32t_front( self) end |
#get_element ⇒ Fixnum
method wrapper for uint32_t std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::operator[](size_t size)
39384 39385 39386 39387 39388 |
# File 'lib/ropencv/ropencv_types.rb', line 39384 def [](size) validate_index(size) __validate_pointer__ Rbind::std_vector_uint32t_operator_array( self, size) end |
#pop_back ⇒ Void
method wrapper for void std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::pop_back()
39367 39368 39369 39370 |
# File 'lib/ropencv/ropencv_types.rb', line 39367 def pop_back() __validate_pointer__ Rbind::std_vector_uint32t_pop_back( self) end |
#push_back(other) ⇒ Void
method wrapper for void std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::push_back(uint32_t other)
39360 39361 39362 39363 |
# File 'lib/ropencv/ropencv_types.rb', line 39360 def push_back(other) __validate_pointer__ Rbind::std_vector_uint32t_push_back( self, other) end |
#reserve(size) ⇒ Void
method wrapper for void std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::reserve(size_t size)
39313 39314 39315 39316 |
# File 'lib/ropencv/ropencv_types.rb', line 39313 def reserve(size) __validate_pointer__ Rbind::std_vector_uint32t_reserve( self, size) end |
#resize(size, val = Uint32_T()) ⇒ Void
method wrapper for void std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::resize(size_t size, uint32_t val = uint32_t())
methods
39277 39278 39279 39280 |
# File 'lib/ropencv/ropencv_types.rb', line 39277 def resize(size, val = Uint32_T()) __validate_pointer__ Rbind::std_vector_uint32t_resize( self, size, val) end |
#size ⇒ Size_T
method wrapper for size_t std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::size()
39284 39285 39286 39287 |
# File 'lib/ropencv/ropencv_types.rb', line 39284 def size() __validate_pointer__ Rbind::std_vector_uint32t_size( self) end |
#swap(other) ⇒ Void
method wrapper for void std::vector
Maruku could not parse this XML/HTML:
<uint32_t>::swap(std::vector<uint32_t> other)
39375 39376 39377 39378 |
# File 'lib/ropencv/ropencv_types.rb', line 39375 def swap(other) __validate_pointer__ Rbind::std_vector_uint32t_swap( self, other) end |
#to_s ⇒ Object
converts Vector::Uint32_T into a string by crawling through all its attributes
39264 39265 39266 |
# File 'lib/ropencv/ropencv_types.rb', line 39264 def to_s "#<std::vector<uint32_t> >" end |
#validate_index(idx) ⇒ Object
39390 39391 39392 39393 39394 |
# File 'lib/ropencv/ropencv_types.rb', line 39390 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |