Class: OpenCV::Std::Vector::Uint64_T
- Inherits:
-
Object
- Object
- OpenCV::Std::Vector::Uint64_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 = Uint64_T()) ⇒ Void
methods.
- #size ⇒ Size_T
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Vector::Uint64_T into a string by crawling through all its attributes.
- #validate_index(idx) ⇒ Object
Class Method Details
.vector ⇒ Object .vector ⇒ Object
39463 39464 39465 39466 39467 39468 39469 39470 39471 39472 39473 39474 39475 39476 39477 39478 39479 39480 39481 39482 39483 39484 39485 39486 39487 39488 39489 39490 39491 39492 39493 39494 39495 39496 39497 |
# File 'lib/ropencv/ropencv_types.rb', line 39463 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Uint64_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<uint64_t>::vector<uint64_t>() @@std_vector_uint64t_vector_uint64t_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@std_vector_uint64t_vector_uint64t_defaults0[i] end begin return Rbind::std_vector_uint64t_vector_uint64t(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::vector<uint64_t>::vector<uint64_t>(std::vector<uint64_t> other) @@std_vector_uint64t_vector_uint64t2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@std_vector_uint64t_vector_uint64t2_defaults1[i] end begin return Rbind::std_vector_uint64t_vector_uint64t2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
Instance Method Details
#<<(val) ⇒ Object
39704 39705 39706 39707 |
# File 'lib/ropencv/ropencv_types.rb', line 39704 def <<(val) push_back(val) self end |
#[](idx) ⇒ Fixnum
39620 39621 39622 39623 39624 |
# File 'lib/ropencv/ropencv_types.rb', line 39620 def [](size) validate_index(size) __validate_pointer__ Rbind::std_vector_uint64t_operator_array( self, size) end |
#at(size) ⇒ Fixnum
method wrapper for uint64_t std::vector
39629 39630 39631 39632 39633 |
# File 'lib/ropencv/ropencv_types.rb', line 39629 def at(size) validate_index(size) __validate_pointer__ Rbind::std_vector_uint64t_at( self, size) end |
#back ⇒ Fixnum
method wrapper for uint64_t std::vector
39644 39645 39646 39647 |
# File 'lib/ropencv/ropencv_types.rb', line 39644 def back() __validate_pointer__ Rbind::std_vector_uint64t_back( self) end |
#capacity ⇒ Size_T
method wrapper for size_t std::vector
39597 39598 39599 39600 |
# File 'lib/ropencv/ropencv_types.rb', line 39597 def capacity() __validate_pointer__ Rbind::std_vector_uint64t_capacity( self) end |
#clear ⇒ Void
method wrapper for void std::vector
39590 39591 39592 39593 |
# File 'lib/ropencv/ropencv_types.rb', line 39590 def clear() __validate_pointer__ Rbind::std_vector_uint64t_clear( self) end |
#data ⇒ Void
method wrapper for void* std::vector
39651 39652 39653 39654 |
# File 'lib/ropencv/ropencv_types.rb', line 39651 def data() __validate_pointer__ Rbind::std_vector_uint64t_data( self) end |
#delete_if(&block) ⇒ Object
39708 39709 39710 39711 39712 39713 39714 39715 |
# File 'lib/ropencv/ropencv_types.rb', line 39708 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
39694 39695 39696 39697 39698 39699 39700 39701 39702 39703 |
# File 'lib/ropencv/ropencv_types.rb', line 39694 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
39604 39605 39606 39607 |
# File 'lib/ropencv/ropencv_types.rb', line 39604 def empty() __validate_pointer__ Rbind::std_vector_uint64t_empty( self) end |
#front ⇒ Fixnum
method wrapper for uint64_t std::vector
39637 39638 39639 39640 |
# File 'lib/ropencv/ropencv_types.rb', line 39637 def front() __validate_pointer__ Rbind::std_vector_uint64t_front( self) end |
#get_element ⇒ Fixnum
39683 39684 39685 39686 39687 |
# File 'lib/ropencv/ropencv_types.rb', line 39683 def [](size) validate_index(size) __validate_pointer__ Rbind::std_vector_uint64t_operator_array( self, size) end |
#pop_back ⇒ Void
method wrapper for void std::vector
39666 39667 39668 39669 |
# File 'lib/ropencv/ropencv_types.rb', line 39666 def pop_back() __validate_pointer__ Rbind::std_vector_uint64t_pop_back( self) end |
#push_back(other) ⇒ Void
method wrapper for void std::vector
39659 39660 39661 39662 |
# File 'lib/ropencv/ropencv_types.rb', line 39659 def push_back(other) __validate_pointer__ Rbind::std_vector_uint64t_push_back( self, other) end |
#reserve(size) ⇒ Void
method wrapper for void std::vector
39612 39613 39614 39615 |
# File 'lib/ropencv/ropencv_types.rb', line 39612 def reserve(size) __validate_pointer__ Rbind::std_vector_uint64t_reserve( self, size) end |
#resize(size, val = Uint64_T()) ⇒ Void
method wrapper for void std::vector
methods
39576 39577 39578 39579 |
# File 'lib/ropencv/ropencv_types.rb', line 39576 def resize(size, val = Uint64_T()) __validate_pointer__ Rbind::std_vector_uint64t_resize( self, size, val) end |
#size ⇒ Size_T
method wrapper for size_t std::vector
39583 39584 39585 39586 |
# File 'lib/ropencv/ropencv_types.rb', line 39583 def size() __validate_pointer__ Rbind::std_vector_uint64t_size( self) end |
#swap(other) ⇒ Void
method wrapper for void std::vector
39674 39675 39676 39677 |
# File 'lib/ropencv/ropencv_types.rb', line 39674 def swap(other) __validate_pointer__ Rbind::std_vector_uint64t_swap( self, other) end |
#to_s ⇒ Object
converts Vector::Uint64_T into a string by crawling through all its attributes
39563 39564 39565 |
# File 'lib/ropencv/ropencv_types.rb', line 39563 def to_s "#<std::vector<uint64_t> >" end |
#validate_index(idx) ⇒ Object
39689 39690 39691 39692 39693 |
# File 'lib/ropencv/ropencv_types.rb', line 39689 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |