EiffelMedia: File Loader

Overview

The EM_FILE_LOADER can be used to easily load files without having to care fore details. You can use load_* to load a file which then will be available throught last_*.

Supported file types

PLAIN_TEXT_FILE -- Textfile

EM_BITMAP -- Picture

EM_SOUND -- Sound

EM_MUSIC -- Music

EM_ANIMATION -- Animation

EM_SPRITE -- Sprite

EM_COLOR_TTF_FONT -- TrueType Font

EM_BMP_FONT -- Bitmap Font

Using

To use the file_loader, you need to inherit from EM_SHARED_FILE_LOADER. Now you have a new attribute file_loader which you can use to load files.

Usually, when an exception occurs (for example when a file does not exist), the application will fail. Set ignore_missing_file to true if you want the file_loader to handle the exceptions and continue. It will then set has_error to true.