Asset containing chunks.
More...
#include <asset.h>
|
| | ChunkAsset (AAssetManager *manager, const std::string &filename) |
| | Creates a read-only chunk collection from an asset. More...
|
| |
| void | open () |
| | Opens the collection to read chunks from it. More...
|
| |
| void | close () |
| | Closes the collection after a reading session. More...
|
| |
| size_t | size () const |
| | Returns the number of chunks available in the collection after it is opened. More...
|
| |
| bool | chunkExists (const std::string &id) const |
| | Check if a specific chunk exists. More...
|
| |
| chunksize_t | chunkSize (const std::string &id) const |
| | Retrieves size of a specific chunk. More...
|
| |
| chunksize_t | fetch (const std::string &id, void *data, const chunksize_t limit) |
| | Reads a chunk. More...
|
| |
| void | save (const std::string &filename, bool append=false) |
| | Saves the collection to a file. More...
|
| |
| template<typename datatype > |
| datatype | read (const std::string &id) |
| | Reads a chunk and casts it into a given type. More...
|
| |
| template<typename datatype > |
| std::vector< datatype > | readVector (const std::string &id) |
| | Reads a chunk into a vector of a specific type. More...
|
| |
| template<> |
| std::string | read (const std::string &id) |
| |
| virtual | ~Object () |
| |
Asset containing chunks.
Definition at line 80 of file asset.h.
◆ ChunkAsset()
| ChunkAsset::ChunkAsset |
( |
AAssetManager * |
manager, |
|
|
const std::string & |
filename |
|
) |
| |
Creates a read-only chunk collection from an asset.
- Parameters
-
| [in] | manager | AAssetManager instance |
| [in] | filename | The asset file name / path |
Definition at line 99 of file asset.cpp.
ChunkStream(InputStream &stream)
bool parse()
Goes through the input stream to build the list of existing chunks.
JNIEnv jlong jstring filename
◆ open()
| void Beatmup::Android::ChunkAsset::open |
( |
| ) |
|
|
inlinevirtual |
◆ close()
| void Beatmup::Android::ChunkAsset::close |
( |
| ) |
|
|
inlinevirtual |
◆ stream
| Asset Beatmup::Android::ChunkAsset::stream |
|
private |
The documentation for this class was generated from the following files: