Hymn to Beauty
C++ 3D Engine
ResourceList Class Reference

A list of all the resources in a hymn. More...

#include <Resources.hpp>

Classes

struct  Resource
 A resource. More...
 
struct  ResourceFolder
 A folder containing resources. More...
 

Public Member Functions

void Save () const
 Save all resources to file. More...
 
Json::Value ToJson () const
 Creates a Json file for the resources. More...
 
void Load ()
 Load all resources from file. More...
 
void Clear ()
 Clear resources. More...
 
void Refresh ()
 Refresh resources. More...
 
std::string GetSavePath () const
 Gets the path where it's saved. More...
 

Static Public Member Functions

static Resource::Type ExtensionToType (const std::string &extension)
 Convert extension to type. More...
 

Public Attributes

ResourceFolder resourceFolder
 Resources. More...
 
std::string activeScene
 The name of the activeScene. More...
 
unsigned int sceneNumber = 0U
 The id of the next scene to create. More...
 
unsigned int modelNumber = 0U
 The id of the next model to create. More...
 
unsigned int textureNumber = 0U
 The id of the next texture to create. More...
 
unsigned int scriptNumber = 0U
 The id of the next script to create. More...
 

Friends

ResourceListResources ()
 Get the resource list. More...
 

Detailed Description

A list of all the resources in a hymn.

Member Function Documentation

◆ Clear()

void ResourceList::Clear ( )

Clear resources.

◆ ExtensionToType()

ResourceList::Resource::Type ResourceList::ExtensionToType ( const std::string &  extension)
static

Convert extension to type.

Parameters
extensionThe file extension.
Returns
The type of resource.

◆ GetSavePath()

std::string ResourceList::GetSavePath ( ) const

Gets the path where it's saved.

Returns
The full path.

◆ Load()

void ResourceList::Load ( )

Load all resources from file.

◆ Refresh()

void ResourceList::Refresh ( )

Refresh resources.

◆ Save()

void ResourceList::Save ( ) const

Save all resources to file.

◆ ToJson()

Json::Value ResourceList::ToJson ( ) const

Creates a Json file for the resources.

Returns
A json file representing the resources.

Friends And Related Function Documentation

◆ Resources

ResourceList & Resources ( )
friend

Get the resource list.

Returns
The ResourceList instance.

Member Data Documentation

◆ activeScene

std::string ResourceList::activeScene

The name of the activeScene.

◆ modelNumber

unsigned int ResourceList::modelNumber = 0U

The id of the next model to create.

◆ resourceFolder

ResourceFolder ResourceList::resourceFolder

Resources.

◆ sceneNumber

unsigned int ResourceList::sceneNumber = 0U

The id of the next scene to create.

◆ scriptNumber

unsigned int ResourceList::scriptNumber = 0U

The id of the next script to create.

◆ textureNumber

unsigned int ResourceList::textureNumber = 0U

The id of the next texture to create.


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