![]() |
ai::IDataFilter Class ReferenceA stack-based wrapper class over AIDataFilterSuite. More...
Inheritance diagram for ai::IDataFilter:
Detailed DescriptionA stack-based wrapper class over AIDataFilterSuite. Prefer this class over directly accessing the AIDataFilterSuite APIs. Create various convenient, stack-based various data filters and link them together for different needs Most of the methods throw ai::Error if any error is encountered. Check for AINOEXCEPT in method signature which doesn't throw any error. Usage Examples: Create a File Data filter auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kRead, 0, 0); Create a linked Zlib Compression filter for compressed write and uncompressed read Option 1: Link while Creation auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kRead, 0, 0, ai::CreateZDataFilter(IDataFilter::Mode::kRead) ); Option 2: Link After Creation dataFilter->Link(ai::CreateZDataFilter(IDataFilter::Mode::kRead)); Read from filter char buff[1024] = {}; size_t buffSize(sizeof(buff)); dataFilter->Read(buff, buffSize); Write to filter dataFilter->Write(buff, buffSize); Member Enumeration DocumentationConstructor & Destructor Documentation
Member Function Documentation
Returns the size of the content in bytes. The size gets computed with forward and backward seeking. Not all DataFilter support seeking. Implemented in ai::BaseDataFilter.
Returns filter mode to be passed on to AIDataFilter APIs. Implemented in ai::BaseDataFilter.
Returns the effective AIDataFilter, use it to pass to various SDK APIs which requires AIDataFilter. Implemented in ai::BaseDataFilter.
Returns the first filter in this chain, don't use it in a normal case. It is used to chain two filter chains together Implemented in ai::BaseDataFilter.
Returns the filter mode enum value. Implemented in ai::BaseDataFilter.
Link a new data filter to the current chain. No need to specifically unlink. Unlink is called in the destructor AIDataFilterSuite::LinkDataFilter
AIDataFilterSuite::MarkDataFilter Implemented in ai::BaseDataFilter.
AIDataFilterSuite::ReadDataFilter Implemented in ai::BaseDataFilter.
Returns the entire content of the filter. Use it only for small files. When the entire content of the filter can be read in a continuous dynamic memory. Implemented in ai::BaseDataFilter.
Releases and returns the effective AIDataFilter without unlinking the filter. This should only be used when the AIDataFilter is owned by another IDataFilter. Implemented in ai::BaseDataFilter.
AIDataFilterSuite::SeekDataFilter Implemented in ai::BaseDataFilter.
AIDataFilterSuite::WriteDataFilter Implemented in ai::BaseDataFilter. The documentation for this class was generated from the following file: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||