Home | History | Annotate | Download | only in utils

Lines Matching defs:Asset

18 // Class providing access to a read-only asset.  Asset objects are NOT
39 * "Asset" is the base class for all types of assets. The classes below
43 class Asset {
45 virtual ~Asset(void);
50 /* used when opening an asset */
78 * Close the asset, freeing all associated resources.
98 * Open a new file descriptor that can be used to read this asset.
100 * asset is compressed).
105 * Return whether this asset's buffer is allocated in RAM (not mmapped).
111 * Get a string identifying the asset's source. This might be a full
120 Asset(void); // constructor; only invoked indirectly
125 /* set the asset source string */
132 Asset(const Asset& src);
133 Asset& operator=(const Asset& src);
139 * Create the asset from a named file on disk.
141 static Asset* createFromFile(const char* fileName, AccessMode mode);
144 * Create the asset from a named, compressed file on disk (e.g. ".gz").
146 static Asset* createFromCompressedFile(const char* fileName,
151 * Create the asset from a segment of an open file. This will fail
154 * The asset takes ownership of the file descriptor.
156 static Asset* createFromFileSegment(int fd, off_t offset, size_t length,
164 * The asset takes ownership of the file descriptor.
169 static Asset* createFromCompressedData(int fd, off_t offset,
175 * Create the asset from a memory-mapped file segment.
177 * The asset takes ownership of the FileMap.
179 static Asset* createFromUncompressedMap(FileMap* dataMap, AccessMode mode);
182 * Create the asset from a memory-mapped file segment with compressed
185 * The asset takes ownership of the FileMap.
187 static Asset* createFromCompressedMap(FileMap* dataMap, int method,
196 AccessMode mAccessMode; // how the asset was opened
199 Asset* mNext; // linked list.
200 Asset* mPrev;
211 * An asset based on an uncompressed file on disk. It may encompass the
214 class _FileAsset : public Asset {
234 * Standard Asset interfaces.
267 * An asset based on compressed data in a file.
269 class _CompressedAsset : public Asset {
291 * Standard Asset interfaces.