Class: OpenCV::Cv::Ptr::Cv_FileStorage

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

Specializing collapse

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args) ⇒ Object



25023
25024
25025
25026
# File 'lib/ropencv/ropencv_types.rb', line 25023

def method_missing(m,*args)
    raise "Ptr cv::Ptr is empty. Cannot call #{m} on it!" if empty
    get.method(m).call(*args)
end

Class Method Details

.ptrObject .ptrObject .ptrObject .ptrObject

Overloads:

Raises:

  • (ArgumentError)


24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
# File 'lib/ropencv/ropencv_types.rb', line 24841

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Ptr::Cv_FileStorageStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end
    # overloaded method wrapper for cv::Ptr<cv::FileStorage>::Ptr<cv::FileStorage>()
    @@cv_ptr_cv_file_storage_ptr_cv_file_storage_defaults0 ||= []
    if(args.size >= 0 && args.size <= 0)
        targs = args.clone
        targs.size.upto(-1) do |i|
            targs[i] = @@cv_ptr_cv_file_storage_ptr_cv_file_storage_defaults0[i]
        end
        begin
                return Rbind::cv_ptr_cv_file_storage_ptr_cv_file_storage(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Ptr<cv::FileStorage>::Ptr<cv::FileStorage>(cv::Ptr<cv::FileStorage> other)
    @@cv_ptr_cv_file_storage_ptr_cv_file_storage__2_defaults1 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_ptr_cv_file_storage_ptr_cv_file_storage__2_defaults1[i]
        end
        begin
                return Rbind::cv_ptr_cv_file_storage_ptr_cv_file_storage__2(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Ptr<cv::FileStorage>::Ptr<cv::FileStorage>(cv::Ptr<cv::FileStorage> owner, cv::FileStorage* p)
    @@cv_ptr_cv_file_storage_ptr_cv_file_storage__3_defaults2 ||= [nil, nil]
    if(args.size >= 2 && args.size <= 2)
        targs = args.clone
        targs.size.upto(1) do |i|
            targs[i] = @@cv_ptr_cv_file_storage_ptr_cv_file_storage__3_defaults2[i]
        end
        begin
                return Rbind::cv_ptr_cv_file_storage_ptr_cv_file_storage__3(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Ptr<cv::FileStorage>::Ptr<cv::FileStorage>(cv::FileStorage* p)
    @@cv_ptr_cv_file_storage_ptr_cv_file_storage__4_defaults3 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_ptr_cv_file_storage_ptr_cv_file_storage__4_defaults3[i]
        end
        begin
                return Rbind::cv_ptr_cv_file_storage_ptr_cv_file_storage__4(*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



24826
24827
24828
# File 'lib/ropencv/ropencv_types.rb', line 24826

def self.null
    new(Ptr::Cv_FileStorageStruct.new)
end

Instance Method Details

#emptyBool

Note:

method wrapper for bool cv::Ptrcv::FileStorage::empty()

Returns:

  • (Bool)


25015
25016
25017
25018
# File 'lib/ropencv/ropencv_types.rb', line 25015

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

#getCv::FileStorage

Note:

method wrapper for cv::FileStorage* cv::Ptrcv::FileStorage::get()

Returns:



25003
25004
25005
25006
25007
25008
25009
25010
25011
# File 'lib/ropencv/ropencv_types.rb', line 25003

def get()
    __validate_pointer__
    result = Rbind::cv_ptr_cv_file_storage_get( 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

#releaseVoid

Note:

method wrapper for void cv::Ptrcv::FileStorage::release()

methods

Returns:

  • (Void)


24980
24981
24982
24983
# File 'lib/ropencv/ropencv_types.rb', line 24980

def release()
    __validate_pointer__
    Rbind::cv_ptr_cv_file_storage_release( self)
end

#reset(p) ⇒ Void

Note:

method wrapper for void cv::Ptrcv::FileStorage::reset(cv::FileStorage* p)

Parameters:

Returns:

  • (Void)


24988
24989
24990
24991
# File 'lib/ropencv/ropencv_types.rb', line 24988

def reset(p)
    __validate_pointer__
    Rbind::cv_ptr_cv_file_storage_reset( self, p)
end

#swap(other) ⇒ Void

Note:

method wrapper for void cv::Ptrcv::FileStorage::swap(cv::Ptrcv::FileStorage other)

Parameters:

Returns:

  • (Void)


24996
24997
24998
24999
# File 'lib/ropencv/ropencv_types.rb', line 24996

def swap(other)
    __validate_pointer__
    Rbind::cv_ptr_cv_file_storage_swap( self, other)
end

#to_sObject

converts Ptr::Cv_FileStorage into a string by crawling through all its attributes



24969
24970
24971
# File 'lib/ropencv/ropencv_types.rb', line 24969

def to_s
    "#<cv::Ptr<cv::FileStorage> >"
end