Skip to content

Conversation

cbalint13
Copy link
Contributor

This PR avoid ambiguity of vector<int> X = vector<int>() versus int * X = NULL and by other default values. Other ambiguities are solved too. Some expansion with more explicit overloads were required. The API described in the doc remain the very same.

@cbalint13
Copy link
Contributor Author

  • For better review these are the overloads and their main function:
    // overload dscreate() #1
    virtual void dscreate( const int rows, const int cols, const int type, String dslabel ) const;

    // overload dscreate() #2
    virtual void dscreate( const int rows, const int cols, const int type, String dslabel,
             const int compresslevel ) const;

    // overload dscreate() #3
    virtual void dscreate( const int rows, const int cols, const int type, String dslabel,
             const int compresslevel, const vector<int>& dims_chunks ) const;

    /* create two dimensional single or mutichannel dataset */
    virtual void dscreate( const int rows, const int cols, const int type, String dslabel,
             const int compresslevel, const int* dims_chunks ) const;
    // overload dscreate() #1
    virtual void dscreate( const int n_dims, const int* sizes, const int type,
             String dslabel ) const;

    // overload dscreate() #2
    virtual void dscreate( const int n_dims, const int* sizes, const int type,
             String dslabel, const int compresslevel ) const;

    // overload dscreate() #3
    virtual void dscreate( const vector<int>& sizes, const int type, String dslabel,
             const int compresslevel = H5_NONE, const vector<int>& dims_chunks = vector<int>() ) const;

    /* create n-dimensional single or mutichannel dataset */
    virtual void dscreate( const int n_dims, const int* sizes, const int type,
             String dslabel, const int compresslevel, const int* dims_chunks ) const;
    // overload dswrite() #1
    virtual void dswrite( InputArray Array, String dslabel ) const;

    // overload dswrite() #2
    virtual void dswrite( InputArray Array, String dslabel, const int* dims_offset ) const;

    // overload dswrite() #3
    virtual void dswrite( InputArray Array, String dslabel, const vector<int>& dims_offset,
             const vector<int>& dims_counts = vector<int>() ) const;

    /* write into dataset */
    virtual void dswrite( InputArray Array, String dslabel,
             const int* dims_offset, const int* dims_counts ) const;
    // overload dsinsert() #1
    virtual void dsinsert( InputArray Array, String dslabel ) const;

    // overload dsinsert() #2
    virtual void dsinsert( InputArray Array, String dslabel, const int* dims_offset ) const;

    // overload dsinsert() #3
    virtual void dsinsert( InputArray Array, String dslabel,
             const vector<int>& dims_offset, const vector<int>& dims_counts = vector<int>() ) const;

    /* append / merge into dataset */
    virtual void dsinsert( InputArray Array, String dslabel,
             const int* dims_offset = NULL, const int* dims_counts = NULL ) const;
    // overload dsread() #1
    virtual void dsread( OutputArray Array, String dslabel ) const;

    // overload dsread() #2
    virtual void dsread( OutputArray Array, String dslabel, const int* dims_offset ) const;

    // overload dsread() #3
    virtual void dsread( OutputArray Array, String dslabel,
             const vector<int>& dims_offset, const vector<int>& dims_counts = vector<int>() ) const;

    // read from dataset
    virtual void dsread( OutputArray Array, String dslabel,
             const int* dims_offset, const int* dims_counts ) const;

@alalek
Copy link
Member

alalek commented Dec 21, 2015

👍

@opencv-pushbot opencv-pushbot merged commit 99b299a into opencv:master Dec 21, 2015
@cbalint13 cbalint13 deleted the hdf branch December 21, 2015 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants