Cogs.Core
Public Member Functions | List of all members
Cogs::Core::DataFetcherBase Class Reference

Public Member Functions

virtual bool fetchAsync (const std::string &, const FileContents::Callback &, uint64_t, uint64_t, DataFetcherManager::FetchId, FileContentsHints)
 Asynchronously fetches data into memory and forwards it to the provided callback function.
 
virtual void cancelAsyncFetch (DataFetcherManager::FetchId)
 
virtual FileContents::Ptr fetchSync (const std::string &fileName, uint64_t offset, uint64_t size, FileContentsHints hints)
 Fetches data into memory and returns it as a FileContents object.
 

Detailed Description

Definition at line 12 of file DataFetcherBase.h.

Member Function Documentation

◆ cancelAsyncFetch()

virtual void Cogs::Core::DataFetcherBase::cancelAsyncFetch ( DataFetcherManager::FetchId  )
inlinevirtual

Definition at line 25 of file DataFetcherBase.h.

◆ fetchAsync()

virtual bool Cogs::Core::DataFetcherBase::fetchAsync ( const std::string &  ,
const FileContents::Callback &  ,
uint64_t  ,
uint64_t  ,
DataFetcherManager::FetchId  ,
FileContentsHints   
)
inlinevirtual

Asynchronously fetches data into memory and forwards it to the provided callback function.

This function must return false immediately if the data referred to by fileName cannot be read by this fetcher.

Definition at line 21 of file DataFetcherBase.h.

◆ fetchSync()

virtual FileContents::Ptr Cogs::Core::DataFetcherBase::fetchSync ( const std::string &  fileName,
uint64_t  offset,
uint64_t  size,
FileContentsHints  hints 
)
inlinevirtual

Fetches data into memory and returns it as a FileContents object.

If the filename cannot be resolved, or the file cannot be found, a nullptr should be returned.

Definition at line 32 of file DataFetcherBase.h.


The documentation for this class was generated from the following file: