Class ResourceFile

Inheritance Relationships

Derived Types

Class Documentation

class ResourceFile

Interface of a file loaded from disk. Use ResourceLoader to load, create or save files.

Subclassed by AnimatedModelResourceFile, AudioResourceFile, CollisionModelResourceFile, FontResourceFile, ImageCubeResourceFile, ImageResourceFile, MaterialResourceFile, ModelResourceFile, ParticleEffectResourceFile, TextResourceFile

Public Types

enum Type

RTTI storage for the type of file being represented.

Values:

None = 0

Signifies an error in loading. Every valid ResourceFile will have a non-None type.

Lua = 1
Audio = 2
Text = 3
Model = 4
AnimatedModel = 5
CollisionModel = 6
Image = 7
ImageCube = 8
Font = 9
ParticleEffect = 10
BasicMaterial = 11
InstancingBasicMaterial = 12
AnimatedBasicMaterial = 13
SkyMaterial = 14
CustomMaterial = 15
DecalMaterial = 16

Public Functions

ResourceFile(const ResourceFile&)
ResourceFile(const ResourceFile&&)
virtual ~ResourceFile()
virtual void reimport()

Reload the file buffer from disk.

virtual bool save()
virtual void draw()
bool isDirty()

If the file has been changed on disk.

FilePath getPath() const
Type getType() const
const FileTimePoint &getLastReadTime() const
const FileTimePoint &getLastChangedTime()

Public Members

Type m_Type
FilePath m_Path
FileTimePoint m_LastReadTime
FileTimePoint m_LastChangedTime

Public Static Attributes

const Map<Type, const String> ResourceFile::s_TypeNames= { { Type::None, "None" }, { Type::Lua, "Lua" }, { Type::Audio, "Audio" }, { Type::Text, "Text" }, { Type::Model, "Model" }, { Type::AnimatedModel, "AnimatedModel" }, { Type::CollisionModel, "CollisionModel" }, { Type::Image, "Image" }, { Type::ImageCube, "ImageCube" }, { Type::Font, "Font" }, { Type::ParticleEffect, "ParticleEffect" }, { Type::BasicMaterial, "BasicMaterial" }, { Type::InstancingBasicMaterial, "InstancingBasicMaterial" }, { Type::AnimatedBasicMaterial, "AnimatedBasicMaterial" }, { Type::SkyMaterial, "SkyMaterial" }, { Type::CustomMaterial, "CustomMaterial" }, { Type::DecalMaterial, "DecalMaterial" } }

Protected Functions

ResourceFile(const Type &type, const FilePath &path)

Friends

friend ResourceFile::ResourceLoader