File: HDF2DArray.hpp

package info (click to toggle)
pbseqlib 5.3.4%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,020 kB
  • sloc: cpp: 77,246; python: 331; sh: 103; makefile: 42
file content (26 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef _BLASR_HDF_2DARRAY_HPP_
#define _BLASR_HDF_2DARRAY_HPP_

#include <hdf/BufferedHDF2DArray.hpp>

template <typename T>
class HDF2DArray : public BufferedHDF2DArray<T>
{
public:
    void WriteRow(const T* data, int dataLength, int destRow = -1)
    {
        this->writeBuffer = (T*)data;
        this->bufferIndex = dataLength;
        this->bufferSize = dataLength;
        this->Flush(destRow);
        //
        // Reset status of buffer so that no methods are tricked into
        // thinking this is a valid pointer.
        //
        this->writeBuffer = NULL;
        this->bufferIndex = 0;
        this->bufferSize = 0;
    }
};

#endif