Class: OpenCV::Std::Vector::Uint64_T

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Includes:
Enumerable
Defined in:
lib/ropencv/ropencv_types.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.vectorObject .vectorObject

Overloads:

Raises:

  • (ArgumentError)


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

.nullObject

returns a null pointer to the object



39455
39456
39457
# File 'lib/ropencv/ropencv_types.rb', line 39455

def self.null
    new(Vector::Uint64_TStruct.new)
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

Note:

method wrapper for uint64_t std::vector::operator

Parameters:

  • size (Size_T)

Returns:



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

Note:

method wrapper for uint64_t std::vector::at(size_t size)

Parameters:

  • size (Size_T)

Returns:



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

#backFixnum

Note:

method wrapper for uint64_t std::vector::back()

Returns:



39644
39645
39646
39647
# File 'lib/ropencv/ropencv_types.rb', line 39644

def back()
    __validate_pointer__
    Rbind::std_vector_uint64t_back( self)
end

#capacitySize_T

Note:

method wrapper for size_t std::vector::capacity()

Returns:

  • (Size_T)


39597
39598
39599
39600
# File 'lib/ropencv/ropencv_types.rb', line 39597

def capacity()
    __validate_pointer__
    Rbind::std_vector_uint64t_capacity( self)
end

#clearVoid

Note:

method wrapper for void std::vector::clear()

Returns:

  • (Void)


39590
39591
39592
39593
# File 'lib/ropencv/ropencv_types.rb', line 39590

def clear()
    __validate_pointer__
    Rbind::std_vector_uint64t_clear( self)
end

#dataVoid

Note:

method wrapper for void* std::vector::data()

Returns:

  • (Void)


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

#emptyBool

Note:

method wrapper for bool std::vector::empty()

Returns:

  • (Bool)


39604
39605
39606
39607
# File 'lib/ropencv/ropencv_types.rb', line 39604

def empty()
    __validate_pointer__
    Rbind::std_vector_uint64t_empty( self)
end

#frontFixnum

Note:

method wrapper for uint64_t std::vector::front()

Returns:



39637
39638
39639
39640
# File 'lib/ropencv/ropencv_types.rb', line 39637

def front()
    __validate_pointer__
    Rbind::std_vector_uint64t_front( self)
end

#get_elementFixnum

Note:

method wrapper for uint64_t std::vector::operator

Parameters:

  • size (Size_T)

Returns:



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_backVoid

Note:

method wrapper for void std::vector::pop_back()

Returns:

  • (Void)


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

Note:

method wrapper for void std::vector::push_back(uint64_t other)

Parameters:

Returns:

  • (Void)


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

Note:

method wrapper for void std::vector::reserve(size_t size)

Parameters:

  • size (Size_T)

Returns:

  • (Void)


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

Note:

method wrapper for void std::vector::resize(size_t size, uint64_t val = uint64_t())

methods

Parameters:

  • size (Size_T)
  • val (Fixnum) (defaults to: Uint64_T())

Returns:

  • (Void)


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

#sizeSize_T

Note:

method wrapper for size_t std::vector::size()

Returns:

  • (Size_T)


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

Note:

method wrapper for void std::vector::swap(std::vector other)

Parameters:

Returns:

  • (Void)


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_sObject

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