Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::resources::ResourceMode Class Reference

An enum class that specifies how resources should be handled when loading/saving. More...

#include <omResourceMode.h>

Public Types

enum  Enum { READ_ONLY, READ_WRITE }
 An enum type which represents the different resource modes. More...
 

Public Member Functions

 ResourceMode ()
 Create a new resource mode with the READ_WRITE mode. More...
 
 ResourceMode (Enum newMode)
 Create a new resource mode with the specified resource mode enum value. More...
 
 operator Enum () const
 Convert this resource mode type to an enum value. More...
 
data::String toString () const
 Return a string representation of the resource mode. More...
 
 operator data::String () const
 Convert this resource mode into a string representation. More...
 

Detailed Description

An enum class that specifies how resources should be handled when loading/saving.

Member Enumeration Documentation

An enum type which represents the different resource modes.

Enumerator
READ_ONLY 

A resource mode where the resources are loaded for only reading.

This mode allows certain actions to be streamlined and reduces the amount of data that must be loaded into memory in some cases.

For instance, a lossy format needs to store its original encoding to avoid generation loss if the file is saved again. The read-only mode can avoid storing that kind of information that is only needed for writing files.

Saving resources that have been loaded with the read-only mode may result in loss of information.

READ_WRITE 

A resource mode where the resources are loaded for reading and writing.

In this mode, all data needed to losslessly save resources is loaded into memory.

Constructor & Destructor Documentation

om::resources::ResourceMode::ResourceMode ( )
inline

Create a new resource mode with the READ_WRITE mode.

om::resources::ResourceMode::ResourceMode ( Enum  newMode)
inline

Create a new resource mode with the specified resource mode enum value.

Member Function Documentation

om::resources::ResourceMode::operator Enum ( ) const
inline

Convert this resource mode type to an enum value.

data::String om::resources::ResourceMode::toString ( ) const

Return a string representation of the resource mode.

om::resources::ResourceMode::operator data::String ( ) const
inline

Convert this resource mode into a string representation.


The documentation for this class was generated from the following file: