Public Member Functions | |
int | length () |
int | size () |
void | return_loan () |
void | release (DataReaderI< T > reader, SampleSeq< T > data_seq, SampleInfoSeq info_seq) |
Holds a collection of sample data and related meta-data.
The LoanedSamples object holds the loaned data and meta-data returned from a DataReader::read() operation. The object manages the 'loan' by automatically calling return_loan() on the source DataReader when the object is destroyed.
int length | ( | ) |
Access the length of the contained data sequence.
void release | ( | DataReaderI< T > | reader, |
SampleSeq< T > | data_seq, | ||
SampleInfoSeq | info_seq | ||
) |
Transfers the loan to the caller.
The LoanedSamples instance will no longer manage the loaned data. The caller is responsible for ensuring DataReader::return_loan() is invoked as required.
void return_loan | ( | ) |
Return the loaned data to the originating DataReader.
After this call, the LoanedSamples object no longer manages the data or sample info sequences.
int size | ( | ) |
Access the length of the contained data sequence.