Lines Matching refs:Asset
18 // Class providing access to a read-only asset. Asset objects are NOT
41 * "Asset" is the base class for all types of assets. The classes below
45 class Asset {
47 virtual ~Asset(void);
52 /* used when opening an asset */
80 * Close the asset, freeing all associated resources.
100 * Open a new file descriptor that can be used to read this asset.
102 * asset is compressed).
107 * Return whether this asset's buffer is allocated in RAM (not mmapped).
113 * Get a string identifying the asset's source. This might be a full
122 Asset(void); // constructor; only invoked indirectly
127 /* set the asset source string */
134 Asset(const Asset& src);
135 Asset& operator=(const Asset& src);
141 * Create the asset from a named file on disk.
143 static Asset* createFromFile(const char* fileName, AccessMode mode);
146 * Create the asset from a named, compressed file on disk (e.g. ".gz").
148 static Asset* createFromCompressedFile(const char* fileName,
153 * Create the asset from a segment of an open file. This will fail
156 * The asset takes ownership of the file descriptor.
158 static Asset* createFromFileSegment(int fd, off64_t offset, size_t length,
166 * The asset takes ownership of the file descriptor.
171 static Asset* createFromCompressedData(int fd, off64_t offset,
177 * Create the asset from a memory-mapped file segment.
179 * The asset takes ownership of the FileMap.
181 static Asset* createFromUncompressedMap(FileMap* dataMap, AccessMode mode);
184 * Create the asset from a memory-mapped file segment with compressed
187 * The asset takes ownership of the FileMap.
189 static Asset* createFromCompressedMap(FileMap* dataMap, int method,
198 AccessMode mAccessMode; // how the asset was opened
201 Asset* mNext; // linked list.
202 Asset* mPrev;
213 * An asset based on an uncompressed file on disk. It may encompass the
216 class _FileAsset : public Asset {
236 * Standard Asset interfaces.
269 * An asset based on compressed data in a file.
271 class _CompressedAsset : public Asset {
293 * Standard Asset interfaces.